Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
4.4.3
-
None
-
c275ba17d263f9108ee26e32a0f89b0c57e526e0
Description
The mouse pointer option "Snap To" in Windows (Automatically move pointer to the
default button in a dialog box) is turned on.
A QTreeWidget with some items is shown. If you double click on an item
(i.e. the top one) and a dialog box is shown, the mouse pointer
automatically moves to the default button. So far it's all ok. But the
item selection also changes from the double clicked item to the item,
which is right under the default button of the dialog box. This is wrong.
The double clicked item should remain the selected item.
Example Code:
#include <QtCore>
#include <QtGui>
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
QTreeWidget tw;
for (int n = 0; n < 100; n++)
tw.showMaximized();
QMessageBox mb;
QObject::connect(&tw, SIGNAL(doubleClicked(const QModelIndex &)), &mb,
SLOT(exec()));
return a.exec();
}
The same code is working with Qt version 4.3.4.