Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct


    Qt World Summit: Early-Bird Tickets

    [SOLVED] Why is widget !underMouse()?

    General and Desktop
    2
    5
    2370
    Loading More Posts
    • 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.
    • B
      butterface last edited by

      Hi,

      I have a QWidget with a QComboBox in it. When I open the ComboBox and move the mouse over an entry which is outside the widget I get the leaveEvent from the widget where I ask the ComboBox if it is under the mouse or not. Even though the mouse is over the list it always says that it is not which does not make any sense to me.

      Thanks,
      Markus

      1 Reply Last reply Reply Quote 0
      • raven-worx
        raven-worx Moderators last edited by

        the popup of the combobox is another widget...which is a toplevel widget but still child of combobox.

        --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
        If you have a question please use the forum so others can benefit from the solution in the future

        1 Reply Last reply Reply Quote 0
        • B
          butterface last edited by

          How can I know then whether the mouse is over the popup of the combobox or not?

          1 Reply Last reply Reply Quote 0
          • raven-worx
            raven-worx Moderators last edited by

            you could install an eventfilter on "QComboBox::view()":http://qt-project.org/doc/qt-4.8/qcombobox.html#view and check for the wanted events there.

            --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
            If you have a question please use the forum so others can benefit from the solution in the future

            1 Reply Last reply Reply Quote 0
            • B
              butterface last edited by

              The event filter works fine but I still don't get the point why the view is not aware of the mouse position (underMouse is false as well).

              1 Reply Last reply Reply Quote 0
              • First post
                Last post