Details
-
Bug
-
Resolution: Out of scope
-
P3: Somewhat important
-
4.5.3
-
None
Description
Customer ID: 40776
Hello Team
I'm developing an advanced and high intuitive mobile medical application.
The target system is Windows with mobility sdk installed.
The application is mainly operated by pen.
Because it is required to disable context menues that appear on right mouse
button click (long pen press), I need access to the window handle of all
widgets (for setting some specific property on it).
As a result, I have to run my application with Qt::AA_NativeWindows flag.
Now I found out, that using this flag prevents QGraphicsProxyWidget event
forwarding thus subwidgets do not receive enter and leave events - cursor
state and alike do no more work.
I have attached some sample code that shows this behavior.
Start with param -style=plastique to see effect on mouseOver events.
I urgently need a fix for this problem as I found no workaround up to now.
Thanx for your help
Frank
#include <QApplication>
#include <QtGui>
#include <QGraphicsGridLayout>
class MyTest : public QFrame {
Q_OBJECT;
public:
MyTest () : QFrame ()
virtual ~MyTest () {}
private slots:
void slot_clicked ()
private:
QTextEdit * te;
QPushButton * b;
};
#include "main.moc"
int main (int argc, char** argv)
{
QApplication app (argc,argv);
// comment following line to see bug!!!
QCoreApplication::setAttribute (Qt::AA_NativeWindows);
QGraphicsScene scene;
QGraphicsView view (&scene);
MyTest * mt = new MyTest ();
QGraphicsProxyWidget * gpw = scene.addWidget (mt);
gpw->setPos (0, 0);
QPushButton * pb = new QPushButton ("ATest");
gpw = scene.addWidget (pb);
gpw->setPos (100, 100);
view.show ();
return app.exec ();
}