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 displaying buttons in opposite order
Forum Update on Monday, May 27th 2025

QMessageBox displaying buttons in opposite order

Scheduled Pinned Locked Moved Unsolved General and Desktop
5 Posts 3 Posters 1.9k 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.
  • A Offline
    A Offline
    anuj nogja
    wrote on last edited by
    #1

    Hi All,

    I created a QMessageBox which is having two buttons "Yes" and "No". First Yes button then No button.
    When i am running the project by clicking on "Run" then message box is displaying the buttons properly like first "Yes" then "No".
    But when i am running same project from command line (Linux Redhat 7.2) , message box buttons are displaying in opposite order like first "No" then "Yes" button.

    Kindly suggest how this behaviour can be resolved...

    Regards,
    Anuj

    JonBJ jsulmJ 2 Replies Last reply
    0
    • A anuj nogja

      Hi All,

      I created a QMessageBox which is having two buttons "Yes" and "No". First Yes button then No button.
      When i am running the project by clicking on "Run" then message box is displaying the buttons properly like first "Yes" then "No".
      But when i am running same project from command line (Linux Redhat 7.2) , message box buttons are displaying in opposite order like first "No" then "Yes" button.

      Kindly suggest how this behaviour can be resolved...

      Regards,
      Anuj

      JonBJ Online
      JonBJ Online
      JonB
      wrote on last edited by
      #2

      @anuj-nogja
      I can only imagine this is to do with https://doc.qt.io/archives/qq/qq19-buttons.html or https://stackoverflow.com/questions/37219153/how-to-change-the-buttons-order-in-qmessagebox

      1 Reply Last reply
      0
      • A anuj nogja

        Hi All,

        I created a QMessageBox which is having two buttons "Yes" and "No". First Yes button then No button.
        When i am running the project by clicking on "Run" then message box is displaying the buttons properly like first "Yes" then "No".
        But when i am running same project from command line (Linux Redhat 7.2) , message box buttons are displaying in opposite order like first "No" then "Yes" button.

        Kindly suggest how this behaviour can be resolved...

        Regards,
        Anuj

        jsulmJ Offline
        jsulmJ Offline
        jsulm
        Lifetime Qt Champion
        wrote on last edited by
        #3

        @anuj-nogja Do you start your app in both cases on same Linux distribution? Because the button order can depend on window manager used.

        https://forum.qt.io/topic/113070/qt-code-of-conduct

        A 1 Reply Last reply
        1
        • jsulmJ jsulm

          @anuj-nogja Do you start your app in both cases on same Linux distribution? Because the button order can depend on window manager used.

          A Offline
          A Offline
          anuj nogja
          wrote on last edited by
          #4

          @jsulm Yes ..starting both cases in same Linux distribution.

          jsulmJ 1 Reply Last reply
          0
          • A anuj nogja

            @jsulm Yes ..starting both cases in same Linux distribution.

            jsulmJ Offline
            jsulmJ Offline
            jsulm
            Lifetime Qt Champion
            wrote on last edited by
            #5

            @anuj-nogja When starting the app from command line - did you deploy it first? Maybe it is using Qt provided by the Linux distribution instead the one you installed (I assume here you installed Qt by yourself?)?

            https://forum.qt.io/topic/113070/qt-code-of-conduct

            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