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. Problem with QMainQindow Modal
Qt 6.11 is out! See what's new in the release blog

Problem with QMainQindow Modal

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 916 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.
  • M Offline
    M Offline
    manojkumar
    wrote on last edited by
    #1

    Hi,

    I am using Qt 5.3.2 on my MAC OS X 10.10. When I compiled my old source code on Qt5, I faced a weird problem with MainWindow.

    Whenever I close any of its child of it's child, MainWindow comes on top.

    Let say A is MainWindow, B is its child and C is child of B.

    A lanuches B and B launches C. So the order is A at bottom, then comes B and then C at the top.

    When I close C, B goes behind A and A is now on top.

    The same program works good on Qt 4.8 and OS X 10.10. B remains on top after closing C.

    Please help me to fix this issue.

    1 Reply Last reply
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      If B could, in your case, block A, then perhaps you can set it's flags to "Qt::WindowModal":http://qt-project.org/doc/qt-5/qt.html#WindowModality-enum?

      (Z(:^

      1 Reply Last reply
      0
      • M Offline
        M Offline
        manojkumar
        wrote on last edited by
        #3

        It didn't work either. A was non Modal. B was Window Modal and C was non Modal. Now in this situation, if I bring B on top by clicking it, C always remains behind B. It does not come up.

        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