[Qt-interest] a litte mild 'rant'

wim.delvaux at adaptiveplanet.com wim.delvaux at adaptiveplanet.com
Mon Mar 30 19:11:28 CEST 2009


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' ?

>
> > 	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' ???

>
> > 	Why do you sometimes get a signal when widgets change (e.g setText of a
> > 	QTreeWidgetItem)and sometimes not (e.g. when calling setCurrentItem on
> > the treeWidget ???)
>
> You should get a signal when you do a setCurrentItem, but you might need to
> check out the treewidget's model for that (something like layoutChanged or
> dataChanged).
>
> > 	Also the QString().toLatin1().constData() being unusable out of scope is
> > annoying since you need to 'dup' or 'copy' the data to some buffer all
> > the time
>
> So having to free the memory yourself would be better?

Well QString manages string memory space too. perhaps it can manage an 'ascii' 
stringsspace too.
>
> Andreas





More information about the Qt-interest-old mailing list