I am trying to build a GUI which will:
- Load a file with parameters which describe certain type of problem.
- Based on the parameters of the file, show only certain tab in
QTabwidget(of many predefined in Qt Designer.ui)
I plan to make a QTabwidget with, say 10 tabs, but only one should be visible based on the parameters loaded. Enabling certain tab is not an option since it takes to many space and the disabled tabs are grey. I do not want to see disabled tabs.
Removing tab could be an option but the index is not related to a specific tab so I have to take care of the shift in the indices. And furthermore if user loads another file with different parameters, a good tab should be added and the current one removed.
My questions are:
- How to do this effectively?
- Is it better to use any other type of widget?
- In Qt designer, is it possible to define many widgets one over another and then just push the good one in front. If yes, how? And how to edit and change any of them?
- If using
RemoveTab, how to use pointers on tabs, rather than indices?
I use PyQt4
insertTab()andremoveTab()methods. - derricw