caron / PyQtForSoftimage

A system for hosting PyQt applications inside Softimage's interface.
29 stars 10 forks source link

Example update: Ensure a clean FileBrowser look #6

Open tcrowson opened 12 years ago

tcrowson commented 12 years ago

By default (at least on my setup with 2012), the look and feel of a QFileDialog is a weird blend of the Windows and Softimage styles. But this is easily corrected using the following code at the point of calling the QFileDialog().

def launchFileBrowser(self): desktop = Application.Desktop desktop.SuspendWin32ControlsHook() self.fileDialog = QFileDialog(self) sourceDir = self.fileDialog.getExistingDirectory(None,'Choose a directory') ... desktop.RestoreWin32ControlsHook()

Thanks to Luc-Eric Rousseau for pointing this out!