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. Focus button is no longer in focus when you click outside of a modal dialog
Forum Updated to NodeBB v4.3 + New Features

Focus button is no longer in focus when you click outside of a modal dialog

Scheduled Pinned Locked Moved General and Desktop
setfocusfocusbuttonmodal dialog
3 Posts 3 Posters 1.5k Views 3 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.
  • L Offline
    L Offline
    Lynn
    wrote on last edited by
    #1

    I have a modal dialog that pops up and on that dialog window are two buttons. One is in focus by using (setFocus()). The functionality works great, but for some reason, when you click another window (can be outside of application or the main window the dialog window originated from), the modal dialog window is no longer in focus (to be expected) yet the default button that was supposed to be in focus on that window is no longer...it's the next button...it's as if you pressed tab in the dialog window and the next button has gained focus. If I click back on that modal dialog to regain focus for that window, the correct button is refocused so all is good there but I'd like to understand why when you press outside of the modal dialog window, the focus button changes.

    Thoughts?

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

      Hi
      Sounds odd. Tried to make a mini sample but nothing happened.
      No button move.

      Do you have a small sample that does this?

      1 Reply Last reply
      0
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #3

        Hi and welcome to devnet,

        To add to @mrjj What version of Qt and OS are you running ?

        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

        • Login

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