I have a popup QMenu displaying lot of icons in a QListView:
QMenu*menu=createMenu();
QListView*list=createList();
QWidgetAction*action=new QWidgetAction(menu);
action->setDefaultWidget(list);
menu->addAction(action);
menu->show();
Is there a way to make it resizable ? i.e. I would like to be able to drag the corner of the popup menu and resize the popup menu with the mouse. I was not able to find this on google or in Qt documentation.
Try like this:
...
QListView*list=createList();
Qt::WindowFlags winFlags = list->windowFlags();
winFlags = winFlags & ~Qt::MSWindowsFixedSizeDialogHint;
list->setWindowFlags(winFlags);
...
Or same thing on menu
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With