Several postings about setting the QMenu Icon size to be larger then the defaulted 16x16 have been reviewed:
http://www.qtcentre.org/threads/2118...s-aty-16x16-px
http://www.qtcentre.org/threads/1574...-size-in-QMenu
http://www.qtcentre.org/threads/4173...r-resize-icons
Yet I am unable to establish how exactly to implement what these postings have deemed successful in context of PyQt.
Currently my menu is created via the following code:
# build the CSV option Menu
self.
CSVoptionMenu = QMenu( self.
iface.
mainWindow() ) for Option in CSVOptionList:
self.CSVoptionMenu.addAction(Option)
self.CSVoptionMenu.setLayoutDirection(QtCore.Qt.LeftToRight)
self.CSVoptionMenu.setStyleSheet('QMenu::item {padding: 4px 6px 4px 6px;} QMenu::item:selected\
{color: white; background-color: QLinearGradient( x1: 0, y1: \
0, x2: 0, y2: 1, stop: 0 #49a4ff, stop: 1 #1e84ea);}')
self.
CSVoptionMenu.
setIcon(QIcon(":/plugins/graphicgroundwater/buttons/optionsCSVedit.png")) self.CSVoptionMenu.setTitle("Edit Options")
self.CSVoptionMenu.triggered.connect(self.runOptionCSVEditor)
# build the CSV option Menu
self.CSVoptionMenu = QMenu( self.iface.mainWindow() )
for Option in CSVOptionList:
self.CSVoptionMenu.addAction(Option)
self.CSVoptionMenu.setLayoutDirection(QtCore.Qt.LeftToRight)
self.CSVoptionMenu.setStyleSheet('QMenu::item {padding: 4px 6px 4px 6px;} QMenu::item:selected\
{color: white; background-color: QLinearGradient( x1: 0, y1: \
0, x2: 0, y2: 1, stop: 0 #49a4ff, stop: 1 #1e84ea);}')
self.CSVoptionMenu.setIcon(QIcon(":/plugins/graphicgroundwater/buttons/optionsCSVedit.png"))
self.CSVoptionMenu.setTitle("Edit Options")
self.CSVoptionMenu.triggered.connect(self.runOptionCSVEditor)
To copy to clipboard, switch view to plain text mode
I supposed it might be as simple as appending a string to the 'setStyleSheet()' command, but after several attempts with no success - I figured someone might have clearer insights on the issue.
-Appreciations
Bookmarks