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.
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.