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. Check the QML component existence. How?
Forum Updated to NodeBB v4.3 + New Features

Check the QML component existence. How?

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
2 Posts 2 Posters 554 Views 3 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.
  • B Offline
    B Offline
    bogong
    wrote on last edited by
    #1

    Hello all!

    I need to check QML component existence. Something like

    Component.onCompleted: {
        if (QmlCustomComponent) {
        
        } else {
        
        }
    }
    

    I am downloading *.qrc file from server and need to check if component is into it.

    1 Reply Last reply
    0
    • jeremy_kJ Offline
      jeremy_kJ Offline
      jeremy_k
      wrote on last edited by
      #2

      Qt.createComponent from javascript, Loader from QML, and QQmlComponent from C++ all appear to be viable options for the situation described. Loader doesn't appear to allow loading the component without instantiating an instance.

      Asking a question about code? http://eel.is/iso-c++/testcase/

      1 Reply Last reply
      1

      • Login

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