I am using Q_PROPERTY with QML. My code is:
using namespace std; typedef QString lyricsDownloaderString;
and one of the pages in QML is
import QtQuick 1.1 import com.nokia.meego 1.0 import com.nokia.extras 1.0 Page { id: showLyricsPage tools: showLyricsToolbar Column { TextEdit { id: lyricsview anchors.margins: 10 readOnly: true text: azdownloader.lyrics } } Component.onCompleted: { azdownloader.perform() busyind.visible = false } BusyIndicator {id: busyind } ToolBarLayout {id: showLyricsToolbar}
azdownloader is an AZLyricsDownloader object
Codes are correctly executed in C ++, the function returns the text that should be in TextEdit.
But unfortunately, TextEdit is empty. There is no text. there is no body for the signal, but it does not need the AFAIK signal.
If i use
Q_PROPERTY(QString lyrics READ lyrics CONSTANT)
The result is the same.
What am I doing wrong?
source share