Unsolved Custom (Q?)menu including Buttons, ComboBoxes etc.
-
Hello,
I want to have some kind of pop up menu on button click. However it has some controls like QLineEdit, QSpinBox, QComboBox inside.
Bottom section is always visible, clicking bottom right QButton shows the menu. To me the whole bottom section looks kinda like QComboBox however the menu is more complicated.
What is the correct (or easiest?) way to implement such thing? I have never made such thing so idk if I should reimplement QMenu. It seemd from the docs that it is populated by QActions rather than other widgets.
-
You can just create the upper part as a widget and
hide()
it then connect the buttonclicked()
signal to this widget'sshow()
slot -
Yep thats what I've started doing half hour ago. I just thought there was some smarter way to create such menu :D