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. QMessageBox location
Forum Update on Monday, May 27th 2025

QMessageBox location

Scheduled Pinned Locked Moved Solved General and Desktop
qmessagebox
6 Posts 2 Posters 1.3k 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.
  • J Offline
    J Offline
    Jedd
    wrote on 27 Mar 2018, 18:00 last edited by
    #1

    When my application presents a message with QMessageBox, the message is centered over my app, which is just how I want it. However, on a multiple monitor system, if I drag my application to a different monitor, messageboxes appear on the original monitor, not the monitor the program was dragged to. Is there a way to lock my messageboxes to current location of the application?

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 27 Mar 2018, 19:08 last edited by
      #2

      Hi,

      What version of Qt are you using ?
      On what OS ?
      If Linux: what distribution ? Desktop Environment ?
      With which compiler ?

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

      J 1 Reply Last reply 27 Mar 2018, 19:17
      0
      • S SGaist
        27 Mar 2018, 19:08

        Hi,

        What version of Qt are you using ?
        On what OS ?
        If Linux: what distribution ? Desktop Environment ?
        With which compiler ?

        J Offline
        J Offline
        Jedd
        wrote on 27 Mar 2018, 19:17 last edited by Jedd
        #3

        @SGaist 5.6 and 5.10.1. All OSs (Win7/8/10),OS X, Linux. I'm not currently using Qt 5.6, but the exhibited behavior is the same.

        1 Reply Last reply
        0
        • S Offline
          S Offline
          SGaist
          Lifetime Qt Champion
          wrote on 27 Mar 2018, 21:26 last edited by
          #4

          Can you show a minimal sample application that reproduces that behaviour ?

          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
          • J Offline
            J Offline
            Jedd
            wrote on 28 Mar 2018, 15:15 last edited by Jedd
            #5

            Per your suggestion, I built a simple application and qmessagebox behaved exactly as it should when I dragged the program to different monitors. So, I went back into my problem code and discovered the behavior was self-induced.

            1 Reply Last reply
            0
            • S Offline
              S Offline
              SGaist
              Lifetime Qt Champion
              wrote on 28 Mar 2018, 20:07 last edited by
              #6

              Glad you found out !

              Could you explain what happened in your code to trigger this ?

              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
              1

              2/6

              27 Mar 2018, 19:08

              4 unread
              • Login

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