Fix property-setter for strings
AKA qt_setstringproperty().
This commit is contained in:
parent
1704d392e8
commit
a8f324ca68
4
main.cpp
4
main.cpp
|
@ -188,12 +188,12 @@ propsetter(int, int, QMetaType::Int)
|
|||
propsetter(float, double, QMetaType::Double)
|
||||
propsetter(char, char, QMetaType::Char)
|
||||
|
||||
___bool qt_setstringproperty(QWidget *w, char *prop, const char* val)
|
||||
___bool qt_setstringproperty(QWidget *w, char *prop, char* val)
|
||||
{
|
||||
const QMetaObject *mo = w->metaObject();
|
||||
int i = mo->indexOfProperty(prop);
|
||||
if(i == -1) return 0;
|
||||
else return mo->property(i).write(w, QVariant(val));
|
||||
else return mo->property(i).write(w, QVariant((const char*)val));
|
||||
}
|
||||
|
||||
|
||||
|
|
Ŝarĝante…
Reference in New Issue