Reusing some widgets or not?
-
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
-
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
-
@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. -
@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? -
@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. -