[Qt-interest] QFileDialog Question (SOLVED)

Scott Aron Bloom Scott.Bloom at sabgroup.com
Fri Dec 12 23:55:30 CET 2008


Another options...

Looking at the code, TT uses 

QSettings settings( QSettings::UserScope, "Trolltech" )
settings.beginGroup( "Qt" );
settings.setValue( "filedialog", saveState() )

saveState returns a QByteArray...

So... in your app..
QSettings settings( QSettings::UserScope, "Trolltech" )
settings.beginGroup( "Qt" );
settings.remove( "filedialog" ) 

Will reset it in a platform independent manner.
Scott




> -----Original Message-----
> From: qt-interest-bounces at trolltech.com [mailto:qt-interest-
> bounces at trolltech.com] On Behalf Of Stacy Alley
> Sent: Friday, December 12, 2008 1:32 PM
> To: Qt-interest
> Subject: Re: [Qt-interest] QFileDialog Question (SOLVED)
> 
> I'm going to post the solution to the problem listed below in case
> anybody else ever runs into this:
> 
> in your home directory, inside the .config directory, there is a file
> called Trolltech.conf.
> There is a long line in that file that starts like this:
> filedialog=@ByteArray ....
> If you delete that line, the problem goes away.  Woo hoo!
> 
> 
> Stacy Alley wrote:
> > Hi All,
> > So... anybody know where I can find where the QFileDialog widget
stores
> > it information for the history in the 'Look in:' combo box
> > if I'm using Linux?  (CentOs  2.6.18)
> >
> > I'm not 100% sure this will even cure my problem so I'll describe
what's
> > happening and any input would be greatly appreciated!
> > I'm currently the ONLY user with the problem too so it makes it even
> > weirder...
> >
> > If I bring up the QFileDialog widget in my application to open a
file,
> > it doesn't always show the correct files and subdirectories.  It
shows
> > the files from a different user's area.  So in the 'Look in:'  line
edit
> > it says /example/stacy  but it will show me the files in
/example/fred.
> > Then if I use the up arrow to go up a directory, like in the case to
> > /example  the file dialog box does not show anything.
> > This behavior seems to get even crazier if I try to set the
> > QFileDialog's name filters or it's current directory.  But like I
said,
> > this is only for
> > _/me/_, nobody else is having this weirdness. Has anybody ever seen
> > anything like this before?
> > I'm using Qt version 4.4.3.
> > Thanks-
> > Stacy
> > _______________________________________________
> > Qt-interest mailing list
> > Qt-interest at trolltech.com
> > http://lists.trolltech.com/mailman/listinfo/qt-interest
> >
> 
> --
> Stacy Alley
> 
> Astrogeology Team Programmer
> U.S. Geological Survey
> 2255 North Gemini Drive
> Flagstaff, AZ 86001
> (928)556-7258
> 
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest




More information about the Qt-interest-old mailing list