[QT 4.6.3] Focus (?) problem after a double click on a QTreeView
-
Hi,
I have an application window with different graphical widgets and a button opening a pop-up window. On my pop-up window I have a QtreeView and a button "validate".When I'm selecting (by simple clicking) one element of the QTreeView and pushing the validate button, my pop-up window disappears. Then, the application window received all the mouse events (tested by enterEvent() on one of the widgets). This is the expected beahavior.
When I'am selecting/validating just using the double-click, my pop-up window disappears. But the application window does not receive the mouse events as long as I have not performed a mouse click on the window.
Whatever the method (by the button validate, or by the double click), the application code that is executed is exactly the same (the same slot is called).
Comparing which widget is the focus widget (calling QApplication::focusWidget()) in the two cases gives me the same anwer. Trying to force the application widget by a setFocus() change nothing. Trying to perform a postEvent(mousepress)/postevent(mouserelease) to the application widget does nothing.
So I do not know which hidden process is performed by the double-click in the QTreeView that creates this trouble. By the way I do not know how to solve my problem.