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. Mouse movement leaking through to underlying widget
Qt 6.11 is out! See what's new in the release blog

Mouse movement leaking through to underlying widget

Scheduled Pinned Locked Moved Solved General and Desktop
2 Posts 2 Posters 424 Views 1 Watching
  • 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.
  • gde23G Offline
    gde23G Offline
    gde23
    wrote on last edited by
    #1

    Hello,

    I have a QCombobox on top of another widget.
    The underlying widget uses mouseMoveEvent() for interaction.

    Now when I click on the QComboBox and the menu pops up the underlying widget acts like if i had moved the mouse.
    This only happens on Windows. On Linux everything works as it should.

    So do I have to subclass the QComboBox and call event->accept() explicitly so it does not forward to the underlying widget or how can I prevent this?

    1 Reply Last reply
    0
    • mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi
      yep,on first click on the combobox, a moveevent is sent to widget under.
      I assume its due to it still having focus until after the mouseupEvent on the combo.

      And yes, it does work to call accept for the event in a custom Combobox as this sample shows

      https://www.dropbox.com/s/ljd4s29abzrvtc9/combotest.zip?dl=0

      1 Reply Last reply
      2

      • Login

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