Fix missing native icon warning in test suite.

Fix using `icon_url` of `close.svg` in the native test suite, due to an
invalid `style_prefix`. Closes #27.
main
Alex Huszagh 2022-04-26 09:07:27 -05:00
parent a9be9b96e7
commit 4a04f66a0b
1 changed files with 4 additions and 1 deletions

View File

@ -385,7 +385,10 @@ def test_menu(widget, window, font, width, *_):
action3 = QAction('&Action 6', window)
action3.setCheckable(True)
menu.addAction(action3)
icon = QtGui.QIcon(f'{style_prefix}close.svg')
icon_url = f'{style_prefix}close.svg'
if args.stylesheet == 'native':
icon_url = None
icon = QtGui.QIcon(icon_url)
menu.addAction(QAction(icon, '&Action 7', window))
menu.addAction(QAction(icon, '&Action 8', window))
submenu.addAction(QAction(icon, '&Action 9', window))