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. child class of QWidget and .ui
Qt 6.11 is out! See what's new in the release blog

child class of QWidget and .ui

Scheduled Pinned Locked Moved Unsolved General and Desktop
6 Posts 3 Posters 1.1k 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.
  • S Offline
    S Offline
    stephane78 0
    wrote on last edited by stephane78 0
    #1

    Hi, is it possible to associate a class derivated from QWidget and a .ui ?
    I think it is only possible with QDialog and QMainWindow..

    jsulmJ 1 Reply Last reply
    0
    • S stephane78 0

      Hi, is it possible to associate a class derivated from QWidget and a .ui ?
      I think it is only possible with QDialog and QMainWindow..

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

      @stephane78-0 said in child class of QWidget and .ui:

      Hi, is it possible to associate a class derivated from QWidget and a .ui ?

      I'm not sure what that means. What exactly do you want to do?

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

      S 1 Reply Last reply
      0
      • jsulmJ jsulm

        @stephane78-0 said in child class of QWidget and .ui:

        Hi, is it possible to associate a class derivated from QWidget and a .ui ?

        I'm not sure what that means. What exactly do you want to do?

        S Offline
        S Offline
        stephane78 0
        wrote on last edited by
        #3

        @jsulm I want to use QtabWidget and add Tabs (child of QWidget),and I want to use a .ui for each tab

        jsulmJ Pl45m4P 2 Replies Last reply
        0
        • S stephane78 0

          @jsulm I want to use QtabWidget and add Tabs (child of QWidget),and I want to use a .ui for each tab

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

          @stephane78-0 Take a look at this: https://doc.qt.io/qt-5/quiloader.html

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

          S 1 Reply Last reply
          3
          • S stephane78 0

            @jsulm I want to use QtabWidget and add Tabs (child of QWidget),and I want to use a .ui for each tab

            Pl45m4P Offline
            Pl45m4P Offline
            Pl45m4
            wrote on last edited by
            #5

            @stephane78-0

            I think in your case it's enough to just create custom widgets (based on / derived from QWidget-class) and add them with ui->yourTabWidget->addTab(yourCustomWidget) to the standard QTabWidget.


            If debugging is the process of removing software bugs, then programming must be the process of putting them in.

            ~E. W. Dijkstra

            1 Reply Last reply
            2
            • jsulmJ jsulm

              @stephane78-0 Take a look at this: https://doc.qt.io/qt-5/quiloader.html

              S Offline
              S Offline
              stephane78 0
              wrote on last edited by
              #6

              @jsulm thank you jsulm, I will try it

              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