I have main.qml with MainPage.qml inserted through:
initialPage: MainPage {tools: toolBarLayout}
because I decided to do it for Symbian. When I try:
QObject *mainPage = rootObject->findChild<QObject*>("MainPage"); if (mainPage) QDeclarativeProperty(mainPage, "toets").write(3);
the message does not go through, but there are no errors, I also tried to connect the SIGNAL to the SLOT on the MainPage with "if (mainPage)", but it also did not respond. I managed to get the signal to the main one, but when I try:
function changeNum(num) { MainPage.changeNum(num) }
The function never starts, because I do not receive a message from console.log at all, unlike what I do when the main function starts. I also know that other methods did not work because they also did not register the message or perform other functions.
I think the problem may be that MainPage is not created as an element with an identifier. Do you know what could be causing this?
source share