Hello,
In exposing my C++ objects to javascript, I have properties of types QSizeF, QColor and other Qt types:
class Control : public QGraphicsWidget{
Q_OBJECT
Q_PROPERTY (QSizeF size READ getSize WRITE setSize
) Q_PROPERTY (QColor bgColor READ getBgColor WRITE setBgColor
) ...
}
class Control : public QGraphicsWidget{
Q_OBJECT
Q_PROPERTY (QSizeF size READ getSize WRITE setSize )
Q_PROPERTY (QColor bgColor READ getBgColor WRITE setBgColor)
...
}
To copy to clipboard, switch view to plain text mode
These properties are converted to Variant in javascript, so this code won't work :
myControl = new Control();
myControl.size.height = 40;
myControl = new Control();
myControl.size.height = 40;
To copy to clipboard, switch view to plain text mode
What do I have to do to access these properties in javascript? Do I have to set a default prototype for QSizeF and others, or do I have to create my own Size,Color, classes?
Thank you,
Bookmarks