QSplitter indexOf() documentation bug

Report any problems with CopperSpice
Post Reply
seasoned_geek
Posts: 253
Joined: Thu Jun 11 2020 12:18 pm

QSplitter indexOf() documentation bug

Post by seasoned_geek »

All,

https://www.copperspice.com/docs/cs_api/class_qsplitter.html#af5098f12ce71992b9f31c175a3492ff2
Returns the index in the splitter's layout of the specified widget. This also works for handles. Handles are numbered starting from 0. There are as many handles as there are child widgets, but the handle at position 0 is always hidden.
So what does it return when it fails? I would assume -1 but that could be a fatal assumption.
ansel
Posts: 152
Joined: Fri Apr 10 2015 8:23 am

Re: QSplitter indexOf() documentation bug

Post by ansel »

seasoned_geek wrote: Tue Feb 22 2022 10:44 am
Returns the index in the splitter's layout of the specified widget. This also works for handles. Handles are numbered starting from 0. There are as many handles as there are child widgets, but the handle at position 0 is always hidden.
So what does it return when it fails? I would assume -1 but that could be a fatal assumption.
Thanks for noticing this omission. The QSplitter::indexOf() method does indeed return -1 when the widget is not found, we will update the documentation.
Ansel Sermersheim
CopperSpice Cofounder
Post Reply