Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Calling a function from a new state
dstudentx last edited by
I have a sqlite database, I'm using a function to load the database.
I can only get the database to show the contents in all the states not just specific states. Can't I just call the function in say state1
here is how I'm calling the function.
That depends when your component is being built (you are using onCompleted, after all!). You can try some JS code there:
if (state == "state1")
JapieKrekel last edited by
And in addition to that, if you want to load different data you could use the onStateChanged in your item/component.
if (state == "state1") get_db(3);
else if (state == "state2") ...