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. Similar reference for different tabs in tabwidget (Strange problem )

Similar reference for different tabs in tabwidget (Strange problem )

Scheduled Pinned Locked Moved Unsolved General and Desktop
13 Posts 3 Posters 2.4k 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.
  • ? Offline
    ? Offline
    A Former User
    wrote on last edited by
    #4

    Hello again,

    I think the correct way to get the correct reference is to use :

    currentTabWidget = self.tabs.currentWidget()

    with self.tabs = self.findChild(QtGui.QTabWidget, 'tabWidget')

    I tested, it works well. Thanks.

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

      That's pretty convoluted.

      You seem to be creating InterfaceTemplateDialog for each tab in your QTabWidget and then in your onChange method you seem to create a new InterfaceTemplateDialog to call a function on it. That doesn't make much sense.

      What exactly do you want to do ? And when ?

      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
      • ? Offline
        ? Offline
        A Former User
        wrote on last edited by
        #6

        My tabs have the same content (widget) with same buttons, checkboxes, .. What I want to do exactly is to execute actions (button click ..) on a selectioned tab .

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

          Then create your widget, then the connections for that widget and finally add it to your QTabWidget.

          However, why do you need a QTabWidget that contains the exact same widget several times ?

          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
          • ? Offline
            ? Offline
            A Former User
            wrote on last edited by
            #8

            Hello,

            Actually, there is a table with serveral columns. Now, we want to transform this table to a tabwidget beacause, may be we can have many columns so the size of the table will be not sufficient.

            jsulmJ 1 Reply Last reply
            0
            • ? A Former User

              Hello,

              Actually, there is a table with serveral columns. Now, we want to transform this table to a tabwidget beacause, may be we can have many columns so the size of the table will be not sufficient.

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

              @EJWA If the table is too big how can tab widget help?
              You should put your table into QScrollArea http://doc.qt.io/qt-5.8/qscrollarea.html

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

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

                Hi, this is what my client want. I think tabs are more beautiful in design than tables.

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

                  What kind of table ? Showing what ?

                  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
                  • ? Offline
                    ? Offline
                    A Former User
                    wrote on last edited by
                    #12

                    Table with different scenarios (use cases) : every column has many checkboxes to check to run the program selected

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

                      Then why don't you put the active logic directly in your InterfaceTemplateDialog ?

                      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

                      • Login

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