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. Issues with non-modal dialog being displayed behind their parent
QtWS25 Last Chance

Issues with non-modal dialog being displayed behind their parent

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 1.7k 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.
  • E Offline
    E Offline
    elm66
    wrote on last edited by
    #1

    I have been having issues since 4.8 with non-modal dialogs that hide behind their parent when the parent is refocused.
    This was not a behavior in the prior version 4.7. I am sure not to be the only one with that issue. Is this reported as a bug? Is there any solutions? even temp ones.
    Thanks
    Eric

    1 Reply Last reply
    0
    • R Offline
      R Offline
      rschaub
      wrote on last edited by
      #2

      I'm unaware of this bug, but you can circumvent it by using something similar to

      @
      void CMyBackgroundWidget::focusInEvent(QEvent*)
      {
      m_pMyForegroundWidget->raise();
      }
      @

      the "raise()":http://qt-project.org/doc/qt-4.8/qwidget.html#raise will move the foreground widget to the top of the hierarchy and display it there.
      Note that m_pMyForegroundWidget should be on the same hierarchy level as the instance of CMyBackgroundWidget. If they're descendants of each other, this fix won't work.

      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