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. editingFinished opening a modal dialog hides/blocks mouseUp events for the new focus target, but still runs the mouseDown.

editingFinished opening a modal dialog hides/blocks mouseUp events for the new focus target, but still runs the mouseDown.

Scheduled Pinned Locked Moved Unsolved General and Desktop
focusfocus issuebug
2 Posts 2 Posters 934 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.
  • Z Offline
    Z Offline
    Zicandar
    wrote on 24 Nov 2017, 15:06 last edited by
    #1

    Hello,

    What happens is that when I have a spinbox (lets call it A), with an autoconnected editingFinished signal. The editingFinished gets called properly, and inside it I show a dialog with QMessageBox::question. So far all is good. However if I cause the editingFinished by for example pressing down on the up button of a different spinbox (lets call it B), then once the modal dialog has closed, B will continuously increment the value as it believes it's being held down.
    How do I get rid of this behavior? Or work around it? This applies to more then only spinboxes, however with those it's the most noticeable. By clicking on a Button to cause editingFinished, the button will look as if it has no mouse interaction while the dialog is open. However as soon as the dialog is closed, the button gets "stuck" in a mouse down "look".

    I think this is a bug, but as it seems to have existed for a long time, it might not be? (I did find this: https://blogs.msdn.microsoft.com/gpalem/2012/03/03/dealing-with-qt-out-of-order-focusoutevent-bug/ )
    According to a semi-old post: https://forum.qt.io/topic/3247/signal-slot-question/13 it was possible to get past this by setting the other widgets focus policies to StrongFocus. However this did NOT work for me.
    Also, there is a difference between what is happening to me, and the behaviour I can find reports on. It looks like I only get the mouseDown event, and not a "clicked" event.

    Help would be very much appriciated!

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 24 Nov 2017, 21:15 last edited by
      #2

      Hi,

      I'd try with a custom QDialog and use the open method.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0

      1/2

      24 Nov 2017, 15:06

      • Login

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