Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct

    Solved Move QMainWindow on top of the other windows

    General and Desktop
    2
    5
    263
    Loading More Posts
    • 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.
    • S
      Stefanoxjx last edited by

      Hi, I've some instances of QMainWindow.
      Is possible using them to move a single QMainWindow on top of the other?
      I'm searched a solution but I found nothing.

      Thanks.

      Stefano

      JonB 1 Reply Last reply Reply Quote 0
      • JonB
        JonB @Stefanoxjx last edited by

        @Stefanoxjx
        If it does what you want, Qt::WindowStaysOnTopHint is simple.

        1 Reply Last reply Reply Quote 1
        • S
          Stefanoxjx last edited by

          Hi, I don't think that this can help me :(
          I try to explain:
          I've a menu with some QPushButton.
          At each QPushButton a specific window (QMainwindow) is opened.
          Each opened window goes above the others.
          When I click a button already clicked (window already opened) I would need that corresponding window goes on top of all opened window.
          So I would need a method similar to .show() that move window layer.
          I hope I explained myself.
          Thanks.

          JonB 1 Reply Last reply Reply Quote 0
          • JonB
            JonB @Stefanoxjx last edited by

            @Stefanoxjx
            I think you just need to call QWidget::activateWindow() for that, and/or maybe QWidget::raise()?

            1 Reply Last reply Reply Quote 2
            • S
              Stefanoxjx last edited by

              QWidget::ActivateWindow() works fine.
              Many thanks for help :)

              1 Reply Last reply Reply Quote 0
              • First post
                Last post