[Qt-interest] Is it okay to put a QRect (geometry) into a QVariant?

Niels Dekker - no return address noreply at this.is.invalid
Mon Feb 2 21:20:27 CET 2009


My program basically does settings.setValue("geometry",geometry()), to 
store the geometry of a window into the Windows registry.  Is that okay? 
I'm asking, because the geometry is a QRect, and QSettings::setValue 
expects a QVariant as argument.  If I understand correctly, QRect may 
not supported by QVariant, depending on QT_NO_GEOM_VARIANT.

http://www.qtsoftware.com/developer/task-tracker/index_html?method=entry&id=83131 
says:

  "The define QT_NO_GEOM_VARIANT basically prevents you to put geometry 
classes into QVariant..."

Can you please explain why?

Kind regards,

--
Niels Dekker
http://www.xs4all.nl/~nd/dekkerware
Scientific programmer at LKEB, Leiden University Medical Center 




More information about the Qt-interest-old mailing list