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

create widget dynamically

Scheduled Pinned Locked Moved Unsolved General and Desktop
5 Posts 3 Posters 1.9k 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
    Rameshguru
    wrote on last edited by
    #1

    how to create a widget dynamically

    JonBJ sankarapandiyanS 2 Replies Last reply
    0
    • R Rameshguru

      how to create a widget dynamically

      JonBJ Offline
      JonBJ Offline
      JonB
      wrote on last edited by
      #2

      @Rameshguru

      QWidget *widget = new QWidget()
      
      1 Reply Last reply
      2
      • R Offline
        R Offline
        Rameshguru
        wrote on last edited by
        #3

        THank you @JonB w

        JonBJ 1 Reply Last reply
        0
        • R Rameshguru

          THank you @JonB w

          JonBJ Offline
          JonBJ Offline
          JonB
          wrote on last edited by
          #4

          @Rameshguru
          Wow, I didn't really expect the answer you wanted to be no more than that, but fine of it is.

          You should also read http://doc.qt.io/qt-5/qwidget.html#QWidget and understand about the (optional) parent argument to the constructor. Depending on what you do with the widget you may or may not need to pass that in, to prevent leakages.

          1 Reply Last reply
          3
          • R Rameshguru

            how to create a widget dynamically

            sankarapandiyanS Offline
            sankarapandiyanS Offline
            sankarapandiyan
            wrote on last edited by
            #5

            try this brother.....
            www.qtcentre.org/threads/28475-How-To-Dynamically-Add-Widget-when-Clicked()-signal-emitted-In-Qt-Designer@Rameshguru

            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