[SOLVED] Problems with setting properties in Qt 5.4
ttuna last edited by ttuna
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
Didn't you have any error message at run time ?
@SGaist No, there are no errors at runtime. Just that
Do you also have that failure if you use QStringList rather than QList<QString> ?
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