[Interest] Using QTabWidget to select model instance to display in QTableView

Bo Thorsen bo at fioniasoftware.dk
Thu Jun 21 09:18:53 CEST 2012


Hi Carl,

Den 20-06-2012 20:30, Carl Schumann skrev:
> I would like to use a QTabWidget to allow user selection of the model
> currently displayed in a single QTableView instance.   I want to do this
> because the models have different data but their presentation should be
> uniform, e.g., width of each column.   addTab(...) does not appear to
> allow me to place the same widget multiple times.  I kind of understand
> why that would be the case.   Other ideas about how to make this idea
> work or do it in some better way please?

You might be able to do this with a QTabBar. This is one half of a 
QTabWidget (the other a QStackedWIdget). With just the bar, you can do 
anything you want with the signals from it.

Bo Thorsen,
Fionia Software.

-- 

Expert Qt and C++ developer for hire
Contact me if you need expert Qt help
http://www.fioniasoftware.dk





More information about the Interest mailing list