Is it possible to style a QMenu:item to set a custom height?
I need it for a popup menu, by what I've been seeing it seems it's not possible but maybe someone knows for sure.
Is it possible to style a QMenu:item to set a custom height?
I need it for a popup menu, by what I've been seeing it seems it's not possible but maybe someone knows for sure.
Copyright © 2021 Jogjafile Inc.
Have you tried to use
QSS? This works fine for me:You can use
pMenu->setStyleSheet("QMenu::item { height: 42px; margin: 0px; }");.Note: Make sure you use
::and not:to reference the item.