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. Reusing some widgets or not?
Forum Updated to NodeBB v4.3 + New Features

Reusing some widgets or not?

Scheduled Pinned Locked Moved Solved General and Desktop
5 Posts 2 Posters 279 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.
  • A Offline
    A Offline
    andi456
    wrote on last edited by andi456
    #1

    Hi,

    in my project a number of tabs are created each containing a QTableView instance depending on the information in a configuration file. The user of the program should be able to click on cells in a certain column of one of the QTableViews and being presented a html formated page with a more detailed description in a QTextBrowser instance and three QPushButtons to allow simple navigation and closing the page.

    That's why, I chose to add a QStackedWidget to the tabs containing the QTableViews. Now comes my question from the point of view of efficiency: Is it worth the headache to try to reuse the combination of a QTextBrowser instance and three QPushButton instances or should I just create a new instance for each QTableView instance?

    Kind regards,

    Andreas

    M 1 Reply Last reply
    0
    • A andi456

      Hi,

      in my project a number of tabs are created each containing a QTableView instance depending on the information in a configuration file. The user of the program should be able to click on cells in a certain column of one of the QTableViews and being presented a html formated page with a more detailed description in a QTextBrowser instance and three QPushButtons to allow simple navigation and closing the page.

      That's why, I chose to add a QStackedWidget to the tabs containing the QTableViews. Now comes my question from the point of view of efficiency: Is it worth the headache to try to reuse the combination of a QTextBrowser instance and three QPushButton instances or should I just create a new instance for each QTableView instance?

      Kind regards,

      Andreas

      M Offline
      M Offline
      mpergand
      wrote on last edited by mpergand
      #2

      @andi456
      Assuming you are using modern PC and you don't have 100s of tabs, I would say no, it doesn't worth the pain.

      A 1 Reply Last reply
      0
      • M mpergand

        @andi456
        Assuming you are using modern PC and you don't have 100s of tabs, I would say no, it doesn't worth the pain.

        A Offline
        A Offline
        andi456
        wrote on last edited by
        #3

        @mpergand
        Well, I don't think that I'd need more than 20 of those widgets, i.e. a total of 80. But this shouldn't bring about 10 year old hardware down to its knees, should it?

        M 1 Reply Last reply
        0
        • A andi456

          @mpergand
          Well, I don't think that I'd need more than 20 of those widgets, i.e. a total of 80. But this shouldn't bring about 10 year old hardware down to its knees, should it?

          M Offline
          M Offline
          mpergand
          wrote on last edited by
          #4

          @andi456
          All my PCs are 10 years old at least, I buid complex interfaces with 100s of buttons, never noticed any issue/slow down so far.

          A 1 Reply Last reply
          0
          • M mpergand

            @andi456
            All my PCs are 10 years old at least, I buid complex interfaces with 100s of buttons, never noticed any issue/slow down so far.

            A Offline
            A Offline
            andi456
            wrote on last edited by
            #5

            @mpergand
            Thanks, for confirming my supposition. So I'll spare me the headache of trying to reuse those widgets...

            1 Reply Last reply
            0
            • A andi456 has marked this topic as solved on

            • Login

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