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. replace widget
Forum Updated to NodeBB v4.3 + New Features

replace widget

Scheduled Pinned Locked Moved Unsolved General and Desktop
6 Posts 4 Posters 652 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.
  • M Offline
    M Offline
    megha
    wrote on last edited by
    #1

    How replace widget using signal and slots

    J.HilkJ 1 Reply Last reply
    0
    • dheerendraD Offline
      dheerendraD Offline
      dheerendra
      Qt Champions 2022
      wrote on last edited by
      #2

      Difficult to answer with this question. Please provide some sample to look at what you would like to achieve. Based on this we can help you.

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

      1 Reply Last reply
      1
      • M megha

        How replace widget using signal and slots

        J.HilkJ Offline
        J.HilkJ Offline
        J.Hilk
        Moderators
        wrote on last edited by
        #3

        @megha
        Didn‘t you ask the same question already and @jsulm answered you, or am I off here ?


        Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


        Q: What's that?
        A: It's blue light.
        Q: What does it do?
        A: It turns blue.

        1 Reply Last reply
        0
        • M Offline
          M Offline
          megha
          wrote on last edited by
          #4

          @dheerendra Thank you for your reply sir,
          i created the two class with name with window1,window2, In window1 class i will take two widgets one push button and one is empty widget in horizontal layout and in window2 class i will take one listarea, and now when i click on the window1 class push button window2 class widget should replace with window2 listarea

          jsulmJ 1 Reply Last reply
          0
          • dheerendraD Offline
            dheerendraD Offline
            dheerendra
            Qt Champions 2022
            wrote on last edited by
            #5

            megha @jsulm & @J-Hilk have already said & it is possible. For this you need read how signal & slots work. Also you need to look which objects you can create. Since you are asking we are all telling you that you can do it. Question is what shall we provide you ? Are you asking for example source code ? If this the case, please provide this sample code. Group will you to solve the issue.

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

            1 Reply Last reply
            1
            • M megha

              @dheerendra Thank you for your reply sir,
              i created the two class with name with window1,window2, In window1 class i will take two widgets one push button and one is empty widget in horizontal layout and in window2 class i will take one listarea, and now when i click on the window1 class push button window2 class widget should replace with window2 listarea

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

              @megha Do you mean window or widget? As a window cannot be part of another window.
              If you mean widget then take a look at http://doc.qt.io/qt-5/qstackedwidget.html

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

              1 Reply Last reply
              3

              • Login

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups
              • Search
              • Get Qt Extensions
              • Unsolved