What do you mean it doesn't work?Try surrounding the call with QPainter::save() and QPainter::restore().
What do you mean it doesn't work?Try surrounding the call with QPainter::save() and QPainter::restore().
I mean that only the frame is visible,while I expected an plain,empty space.
Could you provide a mockup picture of what you wanted to obtain and what you did obtain?
Sure,there is is.
As you can see,element QStyle::CE_MenuEmptyArea,as well as QStyle::PE_PanelMenu is not drawn-only the frame is visible.
Although I managed to develop a solution at least-I draw a large QStyle::CE_MenuItem without neither text nor icon,and then paint test items on it.
But still,I don't know why the orginal code does not work.
At least for me the image is not helpful in any way, you provided an image of the whole screen and I wanted two small pictures one of which points to what you get and the other to what you would like to get.
Ok wysota,but in that case you have to wait 'till I come back from work to home.
Bookmarks