[Qt4-preview-feedback] QApplication::keyboardModifiers() broken in 4.5.0 rc1
Philippe
philwave at gmail.com
Fri Feb 6 09:40:25 CET 2009
This is a regression relative to 4.4.3. Test under Windows. The problem is
that QApplication::keyboardModifiers() returns inverted results once a
modifier key has been pressed or release. The following example
illustrates this. Run the program and move the mouse over the window
and look at the debugger console. As you can see, results are wrong.
The same program works fine with 4.4.3.
I think this bug is likely to harm many existing applications, I would
tag is as "show stopper".
////////////
#include <QtGui>
class TMainWindow : public QMainWindow
{
public:
TMainWindow(QWidget* parent = 0)
:
QMainWindow(parent)
{
setMouseTracking(true);
resize(800,400);
}
void mouseMoveEvent(QMouseEvent *)
{
qWarning("Mod %d", QApplication::keyboardModifiers());
}
};
int main (int argc, char** argv)
{
QApplication app(argc, argv);
TMainWindow w ;
w.show();
return app.exec();
}
*****************
More information about the Qt4-feedback
mailing list