How can I draw CE_MenuEmptyArea?
option.initFrom(this);
option.rect=(0,0,100,100);
option.menuRect(0,0,100,100);
style
()->drawControl
(QStyle::CE_MenuEmptyArea,
&option,
&painter,
this);
QPainter painter(this);
QStyleOptionMenuItem option;
option.initFrom(this);
option.rect=(0,0,100,100);
option.menuRect(0,0,100,100);
option.menuItemType=QStyleOptionMenuItem::EmptyArea;
style()->drawControl(QStyle::CE_MenuEmptyArea, &option, &painter, this);
To copy to clipboard, switch view to plain text mode
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?
Bookmarks