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)

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

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
10 Posts 4 Posters 1.1k 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 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
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on 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
      1
      • SGaistS SGaist

        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 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!

        jsulmJ 1 Reply Last reply
        0
        • R RAKULO

          @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!

          jsulmJ Offline
          jsulmJ Offline
          jsulm
          Lifetime Qt Champion
          wrote on 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
          1
          • jsulmJ jsulm

            @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 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!!

            JonBJ jsulmJ 2 Replies Last reply
            0
            • R RAKULO

              @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!!

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

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

              1 Reply Last reply
              0
              • R RAKULO

                @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!!

                jsulmJ Offline
                jsulmJ Offline
                jsulm
                Lifetime Qt Champion
                wrote on 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
                1
                • jsulmJ jsulm

                  @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 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!

                  JonBJ jsulmJ 2 Replies Last reply
                  0
                  • R RAKULO

                    @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!

                    JonBJ Online
                    JonBJ Online
                    JonB
                    wrote on last edited by JonB
                    #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

                      @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!

                      jsulmJ Offline
                      jsulmJ Offline
                      jsulm
                      Lifetime Qt Champion
                      wrote on last edited by jsulm
                      #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