Is there a way to set the initial directory for fileSelector() to be "This PC/"My Computer" on Windows (and the equivalent on other platforms)?
I know the fileSelector() is based on the QFileDialog which lets you do it.
The documentation of fileSelector() doesn't mention anything about this, but it would be useful when a file might be on different mount points.
Setting initial directory as the mount point overview for fileSelector()
- ottemot
- Posts:13
- Joined: Wed Dec 02, 2015 2:30 pm
Setting initial directory as the mount point overview for fileSelector()
- mkoller
- Posts:741
- Joined: Fri Sep 17, 2010 9:03 am
Re: Setting initial directory as the mount point overview for fileSelector()
The docs say that the second argument is "Target directory for selection.", so you need to pass a specific directory.
On Linux I'd say "your PC" is the whole filesystem, which starts at "/", so call fileSelector(s, "/");
The windows virtual pseudo locations can not be defined as start dir.
On Linux I'd say "your PC" is the whole filesystem, which starts at "/", so call fileSelector(s, "/");
The windows virtual pseudo locations can not be defined as start dir.