[SOLVED] Problems with setting properties in Qt 5.4
-
I have defined a property similar to this:
Q_PROPERTY(QList<QString> string_list READ stringList WRITE setStringList NOTIFY stringListChanged)
I want to use
bool QObject::setProperty(const char * name, const QVariant & value)
to set this property, but the function returns false ... with Qt 5.4.I have compiled the same program with Qt 5.5 and - voila - it works.
Any ideas if there was a bugfix (- haven't found anything in the sources) or why this happens?
-
just a push
-
Hi,
Didn't you have any error message at run time ?
-
Do you also have that failure if you use QStringList rather than QList<QString> ?
-
@SGaist
Weird! After changing QList<String> to QStringList the problem didn't show up again. Thx for the hint ...
Nevertheless the QList behaviour is strange.BTW I've tested these with Qt 5.4.2 (MSVC2013 OpenGL 32bit) and Qt 5.5.1 (MSVC2013 OpenGL 32bit)
-
They are two different types so there might have been something going because of that