forty-two
1st July 2012, 16:45
Hi,
How can I call a Qt public slot in the onTextChanged event of a QML-Text, that edits the source attribute of an QML-Image?
What I basically would like to know is how to express the following in QML:
QObject::connect(QML-Text, SIGNAL(onTextChanged()), SomeClass, SLOT(editSource());
The second challenge then would be to change the source attribute of the QML-Image.
What I figured out by now is, that there's some QDeclarativeEngine class, however I don't really get how to implement it. Isn't there just some simple way to change attributes like it's possible with ui-files?
ui->myLabel->setPixmap(pixmap);
Thanks in advance,
forty-two
How can I call a Qt public slot in the onTextChanged event of a QML-Text, that edits the source attribute of an QML-Image?
What I basically would like to know is how to express the following in QML:
QObject::connect(QML-Text, SIGNAL(onTextChanged()), SomeClass, SLOT(editSource());
The second challenge then would be to change the source attribute of the QML-Image.
What I figured out by now is, that there's some QDeclarativeEngine class, however I don't really get how to implement it. Isn't there just some simple way to change attributes like it's possible with ui-files?
ui->myLabel->setPixmap(pixmap);
Thanks in advance,
forty-two