Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Loader question
Forum Updated to NodeBB v4.3 + New Features

Loader question

Scheduled Pinned Locked Moved QML and Qt Quick
qmlqtquickloader
2 Posts 2 Posters 1.3k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • shavS Offline
    shavS Offline
    shav
    wrote on last edited by
    #1

    Hi everyone!

    In my app I have a timer which must refresh UI elements use requests to server. This timer calls method:

    loader.setSource("ContentsView.qml", {manager: root.manager});
    

    every 30 seconds. The ContentsView.qml is a qml file with a lot off other cml files with elements. In my app I'm using signal/slots logic for request and all qml files which shows some information form server content has connects to signals of requests. The my question is: When I call setSource() method the old content removed from memory and all connects to signals is removed? Because I have this problem:

    qrc:///qml/NestleanStatistic.qml:107: TypeError: Cannot read property of null
    qrc:///qml/NestleanStatistic.qml:107: TypeError: Cannot read property of null
    qrc:///qml/NestleanStatistic.qml:107: TypeError: Cannot read property of null
    qrc:///qml/NestleanStatistic.qml:107: TypeError: Cannot read property of null
    qrc:///qml/NestleanStatistic.qml:107: TypeError: Cannot read property of null
    qrc:///qml/NestleanStatistic.qml:107: TypeError: Cannot read property of null
    qrc:///qml/NestleanStatistic.qml:162: TypeError: Cannot read property of null
    qrc:///qml/NestleanStatistic.qml:162: TypeError: Cannot read property of null
    qrc:///qml/NestleanStatistic.qml:162: TypeError: Cannot read property of null
    qrc:///qml/NestleanStatistic.qml:162: TypeError: Cannot read property of null
    qrc:///qml/NestleanStatistic.qml:162: TypeError: Cannot read property of null
    qrc:///qml/NestleanStatistic.qml:162: TypeError: Cannot read property of null
    

    As you can see every time when timer reload Loader cml files has a more and more calls slots. What I do wrong? And the component it not null.

    Mac OS and iOS Developer

    p3c0P 1 Reply Last reply
    0
    • shavS shav

      Hi everyone!

      In my app I have a timer which must refresh UI elements use requests to server. This timer calls method:

      loader.setSource("ContentsView.qml", {manager: root.manager});
      

      every 30 seconds. The ContentsView.qml is a qml file with a lot off other cml files with elements. In my app I'm using signal/slots logic for request and all qml files which shows some information form server content has connects to signals of requests. The my question is: When I call setSource() method the old content removed from memory and all connects to signals is removed? Because I have this problem:

      qrc:///qml/NestleanStatistic.qml:107: TypeError: Cannot read property of null
      qrc:///qml/NestleanStatistic.qml:107: TypeError: Cannot read property of null
      qrc:///qml/NestleanStatistic.qml:107: TypeError: Cannot read property of null
      qrc:///qml/NestleanStatistic.qml:107: TypeError: Cannot read property of null
      qrc:///qml/NestleanStatistic.qml:107: TypeError: Cannot read property of null
      qrc:///qml/NestleanStatistic.qml:107: TypeError: Cannot read property of null
      qrc:///qml/NestleanStatistic.qml:162: TypeError: Cannot read property of null
      qrc:///qml/NestleanStatistic.qml:162: TypeError: Cannot read property of null
      qrc:///qml/NestleanStatistic.qml:162: TypeError: Cannot read property of null
      qrc:///qml/NestleanStatistic.qml:162: TypeError: Cannot read property of null
      qrc:///qml/NestleanStatistic.qml:162: TypeError: Cannot read property of null
      qrc:///qml/NestleanStatistic.qml:162: TypeError: Cannot read property of null
      

      As you can see every time when timer reload Loader cml files has a more and more calls slots. What I do wrong? And the component it not null.

      p3c0P Offline
      p3c0P Offline
      p3c0
      Moderators
      wrote on last edited by
      #2

      @shav

      When I call setSource() method the old content removed from memory and all connects to signals is removed?

      AFAIK, Yes.

      157

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved