[Qt-interest] Data directory best practice

Scott Aron Bloom Scott.Bloom at sabgroup.com
Fri Jun 12 23:04:23 CEST 2009


If you are using the GUI side of things, take a look at
QDesktopServices::storageLocation...

It was added in 4.4, and works great if you are GUI based.. would be
better if it was part of the Core not just the GUI though... :)



> -----Original Message-----
> From: qt-interest-bounces at trolltech.com [mailto:qt-interest-
> bounces at trolltech.com] On Behalf Of Israel Brewster
> Sent: Friday, June 12, 2009 1:11 PM
> To: qt-interest List
> Subject: [Qt-interest] Data directory best practice
> 
> What is the commonly accepted best practice (if there is one) when
setting a
> data directory for a Qt app? I am developing on a mac, and I would
think I'd
> want to put the internal (not user) data files in the
Library/Application
> Support directory. But of course, that wouldn't work well on windows
(even
> using QDir::rootPath() ) as c:/Library/ Application support doesn't
exsist. I
> could, of course, use a #ifdef to define it differently based on
compile OS,
> but is there a better way?
> -----------------------------------------------
> Israel Brewster
> Computer Support Technician II
> Frontier Flying Service Inc.
> 5245 Airport Industrial Rd
> Fairbanks, AK 99709
> (907) 450-7250 x293
> -----------------------------------------------




More information about the Qt-interest-old mailing list