This is a discussion on Qtoolbox and style - KDE ; Hi there, I'm having a big problem with my style and QToolbox. I'm looking for a way to get the index of the toolbox tab I'm drawing. Here is something that should work: const QToolBox* tb = (const QToolBox*) widget; ...
Hi there,
I'm having a big problem with my style and QToolbox. I'm looking for a
way to get the index of the toolbox tab I'm drawing.
Here is something that should work:
const QToolBox* tb = (const QToolBox*) widget;
int index = tb->indexOf( tb->childAt( QPoint(left, top) ) );
widget is of course the parent widget of the pseudo-tab according to Qt
sources and (left, top) comes from the drawing rectangle passed to
mystyle::drawControl().
The problem is that it works only once --when the toolbox tab is
selected-- then never again. When a pseudo-tab is selected for the
second time, index == -1 as if it was out of its parent.
I know the widgets are reordered in a toolbox when opened/close but that
doesn't explain anything. If I can get the index once, why not every
time and for the not selected pseudo-tabs too?
Please, feel free to use very simple words and to call me noob. ;-)
--
==================
Remi Villatel
maxilys_@_tele2.fr
==================
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<