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
QtWS25 Last Chance

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 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
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on 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
      0
      • SGaistS SGaist

        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 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
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on 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 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
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on 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

              • Login

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