Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. [QT 4.6.3] Focus (?) problem after a double click on a QTreeView
Forum Update on Monday, May 27th 2025

[QT 4.6.3] Focus (?) problem after a double click on a QTreeView

Scheduled Pinned Locked Moved General and Desktop
1 Posts 1 Posters 1.2k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Alain38
    wrote on last edited by
    #1

    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.

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved