View Full Version : Multiplateform open folder in explorer
bunjee
11th July 2009, 14:19
Hey guys,
I need to open a folder window in the native OS's explorer.
- Explorer on Windows.
- Finder on MacOSX.
- ...
Anyone ever did that ?
Thanks.
Boron
11th July 2009, 14:42
Would something like this be sufficient?
#include <QtGlobal>
#if defined Q_OS_WIN32
// start explorer process here. E.g. "explorer.exe C:\windows"
#elif defined Q_OS_DARWIN
// start finder process here
#elif defined Q_OS_WHATEVER
// start WHATEVER filebrowser here
#endif
So already the precompiler decides what process to start.
Okspen
9th January 2011, 18:20
http://stackoverflow.com/questions/3569749/qt-open-default-file-explorer-on-nix
found a better solution on stack overflow.
high_flyer
10th January 2011, 09:27
Edit:
sorry, I see now.
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.