88from PySide6 import QtCore
99from PySide6 .QtCore import Qt , QUrl , QJsonValue , qInstallMessageHandler , QtMsgType , QSettings
1010from PySide6 .QtGui import QIcon
11+ from PySide6 .QtQuickControls2 import QQuickStyle
1112from PySide6 .QtWidgets import QApplication
1213
1314import meshroom
@@ -186,12 +187,11 @@ def createMeshroomParser(args):
186187
187188class MeshroomApp (QApplication ):
188189 """ Meshroom UI Application. """
189- def __init__ (self , args ):
190+ def __init__ (self , inputArgs ):
190191 meshroom .core .initPipelines ()
191192
192- QtArgs = [args [0 ], '-style' , 'Fusion' ] + args [1 :] # force Fusion style by default
193-
194- args = createMeshroomParser (args )
193+ args = createMeshroomParser (inputArgs )
194+ qtArgs = []
195195
196196 logStringToPython = {
197197 'fatal' : logging .FATAL ,
@@ -203,7 +203,7 @@ def __init__(self, args):
203203 }
204204 logging .getLogger ().setLevel (logStringToPython [args .verbose ])
205205
206- super (MeshroomApp , self ).__init__ (QtArgs )
206+ super (MeshroomApp , self ).__init__ (inputArgs [ 0 :] + qtArgs )
207207
208208 self .setOrganizationName ('AliceVision' )
209209 self .setApplicationName ('Meshroom' )
@@ -213,6 +213,9 @@ def __init__(self, args):
213213 font .setPointSize (9 )
214214 self .setFont (font )
215215
216+ # Use Fusion style by default.
217+ QQuickStyle .setStyle ("Fusion" )
218+
216219 pwd = os .path .dirname (__file__ )
217220 self .setWindowIcon (QIcon (os .path .join (pwd , "img/meshroom.svg" )))
218221
0 commit comments