I\'m working on a Qt application (in C++). Without appyling any styles, my menu looks like this:
I\'d like it to look like this:
How do I a
You can influence on how your menu appears by playing with its style sheet. With you example code you can do the following:
menu.setStyleSheet("QMenu::item {"
"padding: 2px 5px 2px 2px;"
"}"
"QMenu::item:selected {"
"background-color: rgb(0, 85, 127);"
"color: rgb(255, 255, 255);"
"}");
Note the padding property, which sets the offsets of your menu item rectangles.