cool, thank you.
On Tue, Apr 12, 2011 at 1:24 PM, Hans-Peter Jansen <[email protected]> wrote:
> On Tuesday 12 April 2011, 11:23:33 goocreations wrote:
> > I want to store and retrieve a QColor from QSettings. storing is no
> > problem:
> >
> > self.settings.setValue("Color", myColor)
> >
> > But I can't figure out how to retrieve it again. In C++ you would
> > just call .value<QColor>(), but this is not possible in Python.
> >
> > Any ideas?
>
> Simply wrap the value with a matching c'tor:
>
> QtGui.QColor(value)
>
> Using a reasonably current PyQt, you can provide a type argument:
>
> QSettings.value("Color", QtGui.QColor)
>
> Pete
> _______________________________________________
> PyQt mailing list [email protected]
> http://www.riverbankcomputing.com/mailman/listinfo/pyqt
>
_______________________________________________
PyQt mailing list [email protected]
http://www.riverbankcomputing.com/mailman/listinfo/pyqt