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 Update on Monday, May 27th 2025

Loader question

Scheduled Pinned Locked Moved QML and Qt Quick
qmlqtquickloader
2 Posts 2 Posters 1.3k Views
  • 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.
  • S Offline
    S Offline
    shav
    wrote on 23 Sept 2015, 20:00 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

    P 1 Reply Last reply 24 Sept 2015, 06:21
    0
    • S shav
      23 Sept 2015, 20:00

      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.

      P Offline
      P Offline
      p3c0
      Moderators
      wrote on 24 Sept 2015, 06:21 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

      1/2

      23 Sept 2015, 20:00

      • Login

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