[prev in list] [next in list] [prev in thread] [next in thread]
List: pykde
Subject: Re: [PyKDE] QSettings problem
From: Phil Thompson <phil () riverbankcomputing ! co ! uk>
Date: 2004-04-19 17:21:50
Message-ID: 200404191821.50865.phil () riverbankcomputing ! co ! uk
[Download RAW message or body]
On Monday 19 April 2004 9:41 am, Vicent Mas wrote:
> On Monday 19 April 2004 07:06, Phil Thompson wrote:
> > On Sunday 18 April 2004 8:55 pm, Vicent Mas wrote:
> > > Hi,
> > > I'm trying to use QSettings.setPath method for configuring my
> > > application but it seems to be completely ignored. For instance, this
> > > simple script:
> > >
> > > --------------------------------------------------------------
>
> Hi,
>
> > > #!/usr/bin/env python
> > >
> > > from qt import *
> > >
> > > c = QSettings()
> > > c.setPath('MyCompany.com', 'MyApplication')
> > > c.writeEntry('/Look/currentStyle', 'Platinum')
> > > --------------------------------------------------------------
> >
> > What does writeEntry() return?
>
> It returns true.
>
> > > creates the file $HOME/.qt/lookrc with content:
> > > [General]
> > > CurrentStyle=Windows
> > >
> > > If I add a search path with insertSearchPath, let's say $HOME/test,
> > > then I get a $HOME/test/lookrc file, with the same content as before
> >
> > Are you sure? "CurrentStyle" != "currentStyle".
>
> Yes, you are right. It's a copy -paste mistake. You know, I ran the script
> several times, changing values. The output doesn't correspond to the script
> ('Platinum' != 'Windows' and 'CurrentStyle' != 'currentStyle'), but it
> behaves as I told you.
>
> > > I've revised this mailing list archives looking for a solution, but
> > > with no success. What I'm doing wrong?
> > >
> > > Thanks in advance for your help.
> >
> > Most likely the user doesn't have permissions on the global settings.
>
> The user has permissions (I'm the system admin;).
Then I would expect $QTDIR/etc/settings to contain the correct lookrc, not one
in $HOME/.qt.
This is unlikely to be a PyQt problem - there is nothing special about
QSettings or its methods.
Phil
_______________________________________________
PyKDE mailing list PyKDE@mats.imk.fraunhofer.de
http://mats.imk.fraunhofer.de/mailman/listinfo/pykde
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic