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. How to use a virtual interface in Qml with qmlRegisterInterface?
QtWS25 Last Chance

How to use a virtual interface in Qml with qmlRegisterInterface?

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
qmlregisterinte
1 Posts 1 Posters 1.4k 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.
  • C Offline
    C Offline
    c64zottel
    wrote on last edited by
    #1

    The documentation is kind of sparse in this area: http://doc.qt.io/qt-5/qqmlengine.html#qmlRegisterInterface

    I tried to register my Interface like this:

    qmlRegisterInterface<InputDeviceConfigurator>( "InputDeviceConfigurator" );
    

    But I can not import it because there is no version number and just using it out of the blue gives the "is not a type" error.

    If I declare the type as follows:

    qmlRegisterUncreatableType<InputDeviceConfigurator>(
                "InputDeviceConfigurator", 1, 0, "InputDeviceConfigurator", "Not creatable in Qml." );
    

    It works just fine.

    So, what do I not understand with qmlRegisterInterface?

    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