CE_MenuEmptyArea problem drawing
How can I draw CE_MenuEmptyArea?
Code:
option.initFrom(this);
option.rect=(0,0,100,100);
option.menuRect(0,0,100,100);
style
()->drawControl
(QStyle::CE_MenuEmptyArea,
&option,
&painter,
this);
I ran this code with different styles with no success.
And there is often "break;" in cases of CE_MenuEmptyArea in different styles' sources.
May it be incorrect way to draw plain menu area?
Re: CE_MenuEmptyArea problem drawing
You find a break since normal style won't draw anything in an empty area of the menu bar. You are looking for QStyle::PE_PanelMenuBar with QStyle::drawPrimitive(), I guess.
Re: CE_MenuEmptyArea problem drawing
No, The problem that I'm looking for menu empty area, not menubar one.
But I wouldn't be suprised if styles can't draw such things directly
Re: CE_MenuEmptyArea problem drawing
Sorry, I misunderstood you. After a quick research I am also confused. I bet you are right and CE_MenuEmptyArea is simply left empty that the normal background of the menu panel is used.
Re: CE_MenuEmptyArea problem drawing
And how is menu drawn? Item by Item? But I also couldn't get any plain menu item to draw