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. Transition between two QDialogs

Transition between two QDialogs

Scheduled Pinned Locked Moved General and Desktop
5 Posts 3 Posters 1.5k Views 1 Watching
  • 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.
  • V Offline
    V Offline
    valeSimu
    wrote on last edited by
    #1

    I am developping a new application and I would like that it starts with a QDialog saying welcome and letting the user choose between two options by clicking on one of the two buttons representing the two options.
    I would like that when the user clicks on one of the two buttons, the application answers with another QDialog.

    My question is technical: how is the best way of implement the transition between the two QDialogs?
    One solution can be that I create only one QDialog and when a button is clicked, the same QDialog deletes the widget of the welcome QDialog and sets the new widgets.
    The other solution could be that when a button is clicked, a new QDialog is created.

    Do you have any suggestion? Thanks!

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      Sounds more like a QWizard use case

      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
      • V Offline
        V Offline
        valeSimu
        wrote on last edited by
        #3

        Yes I agree with you, but I would like to have a customized page of the wizard where the buttons in the bottom of the page are not there and the buttons that is suppose to go to the next page is positioned elsewhere... in the page... I couldnt do that for this reason I tried with QDialog

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          QStackedWidget/Layout inside your QDialog ?

          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
          • dheerendraD Offline
            dheerendraD Offline
            dheerendra
            Qt Champions 2022
            wrote on last edited by
            #5

            You are better to create two different dialogs and based on your first action, show the second one. You can either delete the previous one or keep it based on whether you want to reuse the same dialog.

            Dheerendra
            @Community Service
            Certified Qt Specialist
            http://www.pthinks.com

            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