In case I didn't report this before
https://www.copperspice.com/docs/cs_api/class_qtabwidget.html#a439fc78d0153dd984cc9980b98ff45c7
====
void QTabWidget::setCurrentIndex ( int index )
slot
Sets the value of the property to index.
====
Do indexes start at zero or one?
Every place that documents an index needs to specify the starting value. Assuming zero can really burn a person.
QTabWidget documenttion issue
Re: QTabWidget documenttion issue
In general, all indexes in C++ programs start from zero. The QTabWidget class conforms to this convention. We are not aware right now of any class in CopperSpice which uses an index starting with one.seasoned_geek wrote: ↑Fri Mar 04 2022 12:42 am Do indexes start at zero or one?
Every place that documents an index needs to specify the starting value. Assuming zero can really burn a person.
Ansel Sermersheim
CopperSpice Cofounder
CopperSpice Cofounder
-
- Posts: 261
- Joined: Thu Jun 11 2020 12:18 pm
Re: QTabWidget documenttion issue
Well see this discussion.In general, all indexes in C++ programs start from zero. The QTabWidget class conforms to this convention. We are not aware right now of any class in CopperSpice which uses an index starting with one.
https://forum.copperspice.com/viewtopic.php?f=8&t=2006
Where "index = 0" is the default argument but it isn't an actual index, it is the entire enchilada. The first valid match index is 1.
From a documentation and developer standpoint one cannot assume 0 because, as in the case above, it gets a special value.