Quantcast
Channel: Jobs
Viewing all articles
Browse latest Browse all 18427

QWidgetAction not visible

$
0
0
Hi I want a QMenu with oridnary QActions and a QProgressBar in it, so I use na QWidgetAction. The problem is – progress bar isn’t visible at all. There’s an empty row in the menu, but nothing in it. I’ve tried to change QProgressBar for something simpier, for example a QPushButton, but the effect is the same – an empty row. Even QLabel doesn’t work. Code: QWidgetAction *widgetAction = new QWidgetAction(this); widgetAction->setDefaultWidget(new QPushButton("Test button")); menu->addAction(widgetAction); What am I doing wrong? I forgot to mention that it’s a popup menu that appears when user clicks on a tray icon.

Viewing all articles
Browse latest Browse all 18427

Trending Articles