Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. International
  3. India
  4. Reg: Open Parent window when push button clicked in child window
Forum Updated to NodeBB v4.3 + New Features

Reg: Open Parent window when push button clicked in child window

Scheduled Pinned Locked Moved India
12 Posts 6 Posters 9.9k 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
    Vishva
    wrote on last edited by
    #2

    !http://www.thedazzlersinc.com/source/wp-content/uploads/2012/06/flow.png(img)!

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

      Hi,

      This sounds like something where you can use "QWizard":http://qt-project.org/doc/qt-5.0/qtwidgets/qwizard.html

      Hope it helps

      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
      • IamSumitI Offline
        IamSumitI Offline
        IamSumit
        wrote on last edited by
        #4

        When you navigate from 1 to 2 or 2 to 3 ,You close the current window .Don't close these windows, instead of closing them just hide them.
        Solution : "use hide() in place of close()"

        then you can navigate from 3 --->1 .

        Be Cute

        1 Reply Last reply
        0
        • K Offline
          K Offline
          kqt-mr-nv6
          wrote on last edited by
          #5

          you can emit signals from each window to target window
          so that you can call hide()/show() in the slots of respective windows

          1 Reply Last reply
          0
          • V Offline
            V Offline
            Vishva
            wrote on last edited by
            #6

            Thanks.. that works for now..

            1 Reply Last reply
            0
            • N Offline
              N Offline
              ndv472
              wrote on last edited by
              #7

              i also want the same thing but as i used the show()/hide then it will hide the main window but it will not showing new window.
              the new window which i want to show that should be having diff .cpp , .h file and different .ui
              so as we press the push button of main window that new window should open ..
              please help me out..
              thanks in advance

              1 Reply Last reply
              0
              • IamSumitI Offline
                IamSumitI Offline
                IamSumit
                wrote on last edited by
                #8

                Hello ndv472.

                Can you show your code .

                Be Cute

                1 Reply Last reply
                0
                • N Offline
                  N Offline
                  ndv472
                  wrote on last edited by
                  #9

                  yes sir,
                  i have used 2 3 cases
                  1st case
                  void nn_adc_trial::on_pushButton_clicked()
                  {
                  QWidget *new_window=new QWidget ;
                  new_window->show();
                  hide ();
                  }
                  that will give me 1 new window but same of main window

                  1 Reply Last reply
                  0
                  • N Offline
                    N Offline
                    ndv472
                    wrote on last edited by
                    #10

                    also one i got from internet
                    the link i will post
                    http://hxr99.blogspot.in/2011/12/how-to-call-ui-design-form-with.html
                    and from theire i got zip file of that
                    link is : http://www.mediafire.com/download/fbim2vlo9rbpf1p/AboutWin.zip
                    but that is also not working

                    1 Reply Last reply
                    0
                    • IamSumitI Offline
                      IamSumitI Offline
                      IamSumit
                      wrote on last edited by
                      #11

                      [quote author="ndv472" date="1395922437"]i also want the same thing but as i used the show()/hide then it will hide the main window but it will not showing new window.
                      void nn_adc_trial::on_pushButton_clicked()
                      {
                      QWidget *new_window=new QWidget ; new_window->show(); hide ();
                      } [/quote]

                      as per your code definitely it will not show the mainwindow due to hide() but would show new window.

                      [quote author="ndv472" date="1395922437"]the new window which i want to show that should be having diff .cpp , .h file and different .ui
                      so as we press the push button of main window that new window should open ..[/quote]

                      Make your own C++ Class(.cpp/.h) for New widget (inherits QWidget ) that you want to show.

                      Edited:- Try to give your code with proper indentation on the forum so it can be readable.

                      Be Cute

                      1 Reply Last reply
                      0
                      • ? Offline
                        ? Offline
                        A Former User
                        wrote on last edited by
                        #12

                        [quote author="Vishva" date="1382966771"]!http://www.thedazzlersinc.com/source/wp-content/uploads/2012/06/flow.png(img)![/quote]

                        Why dont you use stack concept in Qt, using push and pop for showing parent and child.

                        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