onReady or onDisplayed?

  • Hello,

    I have to populate a Scrollview programmatically by reading a file and dinamically create objects, something which is certainly really common.
    I've created the Scrollview in QML, but I'm wondering how to know when I can populate it from C++ side.

    I was looking for something like onReady or onDisplayed on QML side to be able to call a C++ slot to ask C++ side to do the job but I didn't find it.

    How such thing is commonly done?


  • Moderators

    Hi @ABponant

    You can listen to the following:

    Component.onCompleted: console.log("component ready")

    instead of the console log, you invoke a function/signal in your c++ backend

  • Thanks a lot @J-Hilk .
    I look at it.


Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.