[SOLVED] Problems with setting properties in Qt 5.4
-
wrote on 15 Oct 2015, 15:38 last edited by ttuna 11 Feb 2015, 10:09
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?
-
wrote on 30 Oct 2015, 15:33 last edited by
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> ?
-
wrote on 2 Nov 2015, 10:08 last edited by
@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