Skip to content

Example update: Ensure a clean FileBrowser look #6

@tcrowson

Description

@tcrowson

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!

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions