Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Displaying multiple dialog on the same window(Qt5.14)
Forum Update on Monday, May 27th 2025

Displaying multiple dialog on the same window(Qt5.14)

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
10 Posts 4 Posters 1.2k 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.
  • R Offline
    R Offline
    RAKULO
    wrote on 13 May 2021, 01:38 last edited by
    #1

    I designed a standard dialog box that generates QDialog by clicking pushButton. Now I want each pop-up dialog box to be displayed in the main window one at a time (not as a separate window). What should I do? thank you very much!

    The picture is what it looks like now:
    2021-05-12 17-48-54 的螢幕擷圖.png image url)

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 13 May 2021, 19:28 last edited by
      #2

      Hi and welcome to devnet,

      Do you mean you do not want your QDialog to act as a usual dialog ?

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

      R 1 Reply Last reply 9 Jun 2021, 08:42
      1
      • S SGaist
        13 May 2021, 19:28

        Hi and welcome to devnet,

        Do you mean you do not want your QDialog to act as a usual dialog ?

        R Offline
        R Offline
        RAKULO
        wrote on 9 Jun 2021, 08:42 last edited by
        #3

        @SGaist Sorry for the late reply. I hope that the dialog box function after clicking can be embedded in the label on the right instead of popping up a dialog box. I hope you understand what I mean. Thank you very much!

        J 1 Reply Last reply 9 Jun 2021, 08:44
        0
        • R RAKULO
          9 Jun 2021, 08:42

          @SGaist Sorry for the late reply. I hope that the dialog box function after clicking can be embedded in the label on the right instead of popping up a dialog box. I hope you understand what I mean. Thank you very much!

          J Offline
          J Offline
          jsulm
          Lifetime Qt Champion
          wrote on 9 Jun 2021, 08:44 last edited by
          #4

          @RAKULO said in Displaying multiple dialog on the same window(Qt5.14):

          I hope that the dialog box function after clicking can be embedded in the label on the right instead of popping up a dialog box.

          I fail to understand this.
          Do you want to show a dialog or not?
          Or do you want an editable label?

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

          R 1 Reply Last reply 9 Jun 2021, 09:10
          1
          • J jsulm
            9 Jun 2021, 08:44

            @RAKULO said in Displaying multiple dialog on the same window(Qt5.14):

            I hope that the dialog box function after clicking can be embedded in the label on the right instead of popping up a dialog box.

            I fail to understand this.
            Do you want to show a dialog or not?
            Or do you want an editable label?

            R Offline
            R Offline
            RAKULO
            wrote on 9 Jun 2021, 09:10 last edited by
            #5

            @jsulm Sorry I didn't make it clear, I want to show the "function" of the dialog in the right label, not a pop-up dialog.THX!!

            J J 2 Replies Last reply 9 Jun 2021, 09:11
            0
            • R RAKULO
              9 Jun 2021, 09:10

              @jsulm Sorry I didn't make it clear, I want to show the "function" of the dialog in the right label, not a pop-up dialog.THX!!

              J Offline
              J Offline
              JonB
              wrote on 9 Jun 2021, 09:11 last edited by
              #6

              @RAKULO
              So set the text of the label instead of showing the dialog?

              1 Reply Last reply
              0
              • R RAKULO
                9 Jun 2021, 09:10

                @jsulm Sorry I didn't make it clear, I want to show the "function" of the dialog in the right label, not a pop-up dialog.THX!!

                J Offline
                J Offline
                jsulm
                Lifetime Qt Champion
                wrote on 9 Jun 2021, 09:11 last edited by
                #7

                @RAKULO said in Displaying multiple dialog on the same window(Qt5.14):

                I want to show the "function"

                What do you mean by "function"? Do you want to enter a value directly in the label?

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

                R 1 Reply Last reply 10 Jun 2021, 09:53
                1
                • J jsulm
                  9 Jun 2021, 09:11

                  @RAKULO said in Displaying multiple dialog on the same window(Qt5.14):

                  I want to show the "function"

                  What do you mean by "function"? Do you want to enter a value directly in the label?

                  R Offline
                  R Offline
                  RAKULO
                  wrote on 10 Jun 2021, 09:53 last edited by
                  #8

                  @jsulm Thank you for your reply! I want to display the respective function of each dialog box in the right label after clicking the corresponding button. For example, the color dialog box can set the color, the font dialog box can set the font, and the input dialog box can enter text... But they are not displayed in the new dialog box but displayed on the label on the right!

                  J J 2 Replies Last reply 10 Jun 2021, 10:05
                  0
                  • R RAKULO
                    10 Jun 2021, 09:53

                    @jsulm Thank you for your reply! I want to display the respective function of each dialog box in the right label after clicking the corresponding button. For example, the color dialog box can set the color, the font dialog box can set the font, and the input dialog box can enter text... But they are not displayed in the new dialog box but displayed on the label on the right!

                    J Offline
                    J Offline
                    JonB
                    wrote on 10 Jun 2021, 10:05 last edited by JonB 6 Oct 2021, 10:06
                    #9

                    @RAKULO
                    This is a slightly strange interface, but one of:

                    • Have the dialog raise a signal when its button is pressed. Have the window connect a 8slot* to that, and update the desired corresponding label.
                    • Allow the dialog to exit when the button pressed. Have the caller --- the place which invoked the dialog --- read the button/value the user selected, and have it 9the caller) update the label on the widget.

                    Does this address your requirement?

                    1 Reply Last reply
                    0
                    • R RAKULO
                      10 Jun 2021, 09:53

                      @jsulm Thank you for your reply! I want to display the respective function of each dialog box in the right label after clicking the corresponding button. For example, the color dialog box can set the color, the font dialog box can set the font, and the input dialog box can enter text... But they are not displayed in the new dialog box but displayed on the label on the right!

                      J Offline
                      J Offline
                      jsulm
                      Lifetime Qt Champion
                      wrote on 10 Jun 2021, 10:55 last edited by jsulm 6 Oct 2021, 10:56
                      #10

                      @RAKULO You can use https://doc.qt.io/qt-5/qstackedwidget.html in that "right label" to select a widget corresponding to the clicked button. In each widget you implement the interface you need like selecting color or font. I don't know a way to integrate a dialog into a widget, so you will have to implement these UI interfaces by yourself.
                      Since Qt is open source you can also check the code for the dialog you need to see how you can implement these interfaces.

                      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