I know, the third line is, well, circular. I read Qt sources a little too quickly. widget is in fact the parent of the toolbox tab I have to draw.
Now, the question is: How can I find the widget I'm actually drawing with the few informations I have? All I know for sure is the parent widget and the containing rectangle of the widget I'm looking for. That's not much.
I thought that this code should be a step in the right direction:
int index = tb->indexOf( tb->childAt(left,top) );
int index = tb->indexOf( tb->childAt(left,top) );
To copy to clipboard, switch view to plain text mode
But it doesn't work either. I also tried childAt( r.center() ), all the available mappings although Qt docs don't said any should be necessary. It made no difference.
The noob I am needs a much bigger push in the right direction...
Bookmarks