I'm attempting to scale up a QIcon, but its not working.
class Example(QMainWindow):
def __init__(self):
super().__init__()
self.initUI()
def initUI(self):
exitIcon = QPixmap('./icons/outline-exit_to_app-24px.svg')
scaledExitIcon = exitIcon.scaled(QSize(1024, 1024))
exitActIcon = QIcon(scaledExitIcon)
exitAct = QAction(exitActIcon, 'Exit', self)
exitAct.setShortcut('Ctrl+Q')
exitAct.triggered.connect(qApp.quit)
self.toolbar = self.addToolBar('Exit')
self.toolbar.addAction(exitAct)
self.setWindowTitle('Toolbar')
self.show()
When I run the application it doesn't seem to work. I've tried loading the icon both with QPixmap and directly with QIcon, but it's the same tiny size regardless.
What am I doing wrong here?