Unsolved How in qmenu add scrollarea
-
Hi!
How in qmenu add scrollarea.
It is not works:QScrollArea *scroll = new QScrollArea; scroll->setWidget(menu);
it is too not works:
submenu->setStyleSheet("QMenu { menu-scrollable: 1; }");
-
@Mikeeeeee
Did you read through https://stackoverflow.com/questions/7121718/create-a-scrollbar-in-a-submenu-qt for this? Suggests can't be done and you have do things another way? -
@JonB So I'm asking you how to do it right.
-
@Mikeeeeee
It seems to me they are indicating you can't put a scroll on a menu. Themenu-scrollable: 1;
was not public, so no guarantee that would work, or work now. Though there were a couple of suggestions you might investigate. If they can't, I can't.They also suggested that you don't have a menu with so many items as to need scrolling since it will overwhelm the user, which would be my initial thought, and how you might choose to change your design. Up to you.