V6.7.4 追加更新
This commit is contained in:
@@ -24,6 +24,7 @@
|
||||
#include<string>
|
||||
#include<QLineEdit>
|
||||
#include <QKeyEvent>
|
||||
#include <QWindow>
|
||||
#include "InkJetPrinter.h"
|
||||
|
||||
extern InkJetPrinter *pInkJectPrinter;
|
||||
@@ -125,6 +126,7 @@ void MyInputMethod::updateHandler ( int type ){
|
||||
case 1:
|
||||
if(widget && dynamic_cast<QSpinBox *>(widget)){
|
||||
if(digitalInput->isHidden()){
|
||||
QWidget *hostWindow = widget->window();
|
||||
QRect rec = QApplication::desktop()->screenGeometry();
|
||||
QPoint point = widget->mapToGlobal (QPoint(0,0)); //全局坐标
|
||||
QRect myRec = digitalInput->geometry();
|
||||
@@ -132,6 +134,10 @@ void MyInputMethod::updateHandler ( int type ){
|
||||
(point.y() > rec.height()/2)?(point.y() - myRec.height() - 20):(point.y() + 20),
|
||||
myRec.width(),myRec.height());
|
||||
digitalInput->show();
|
||||
if(hostWindow && digitalInput->windowHandle() && hostWindow->windowHandle()) {
|
||||
digitalInput->windowHandle()->setTransientParent(hostWindow->windowHandle());
|
||||
}
|
||||
digitalInput->raise();
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
||||
Reference in New Issue
Block a user