MCPcopy Create free account
hub / github.com/Liniyous/ElaWidgetTools / isHasIcon

Method isHasIcon

ElaWidgetTools/ElaMenu.cpp:112–132  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

110}
111
112bool ElaMenu::isHasIcon() const
113{
114 QList<QAction*> actionList = this->actions();
115 for (auto action: actionList)
116 {
117 if (action->isSeparator())
118 {
119 continue;
120 }
121 QMenu* menu = action->menu();
122 if (menu && (!menu->icon().isNull() || !menu->property("ElaIconType").toString().isEmpty()))
123 {
124 return true;
125 }
126 if (!action->icon().isNull() || !action->property("ElaIconType").toString().isEmpty())
127 {
128 return true;
129 }
130 }
131 return false;
132}
133
134void ElaMenu::showEvent(QShowEvent* event)
135{

Callers 1

sizeFromContentsMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected