[Qt-interest] a litte mild 'rant'

Andreas Pakulat apaku at gmx.de
Mon Mar 30 21:35:35 CEST 2009


On 30.03.09 18:11:28, wim.delvaux at adaptiveplanet.com wrote:
> On Monday 30 March 2009 19:01:19 Andreas Pakulat wrote:
> > On 30.03.09 17:29:38, wim.delvaux at adaptiveplanet.com wrote:
> > > 	Why you setCurrentIndex for a QToolBox but setCurrentTab for a
> > > QTabWidget ?
> >
> > Because setCurrentTab better explains what it does.
> 
> Yes, ok but why then not call it setCurrentBox() for a QToolBox and 
> setCurrentWidget() for a QStackedWidget ?? surely also there setCurrentIndex 
> is not really 'meaningfull' ?

Hmm, I think I should've looked at the actual API docs before replying. All
three QTabWidget, QStackedWidget and QToolBox have setCurrentIndex as  well
as setCurrentWidget. So actually I don't understand what you mean at all,
there's no difference in those three classes.

> > > 	Why sometimes you have a setCurrentItem ?
> >
> > Same as above.
> 
> so a QToolBox elemet is an 'item' and a element in a StackedWidget is 
> an 'index' ???

QToolBox has no such API. The only classes that have items are those
related to model/view, i.e. combobox, table/tree/listwidgets etc.

Andreas
 
-- 
It's lucky you're going so slowly, because you're going in the wrong direction.



More information about the Qt-interest-old mailing list