QWidgetAction show error
Solved
General and Desktop
-
Hello!
I have created a custom widget to show it when I open a QMenu inside a QPushButton. This is the widget:
When I open it with the QPushButton, it appears at follows:
I don't know why it changes the widgets order and why the down arrow appears in the left side.
This is my code:
QMenu *menu = new QMenu(ui->buttonReports); ui->buttonReports->setMenu(menu); WidgetReports *wReports = new WidgetReports(menu); QWidgetAction *wAction = new QWidgetAction(menu); wAction->setDefaultWidget(wReports); menu->addAction(wAction);
What am I doing wrong?
Thank you very much!