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. Registering an an abstract interface in QML
Forum Updated to NodeBB v4.3 + New Features

Registering an an abstract interface in QML

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
1 Posts 1 Posters 326 Views 1 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.
  • D Offline
    D Offline
    DerKommissar
    wrote on last edited by
    #1

    I have a number of QObject-derived abstract C++ classes that are shared among many other various classes. I was hoping to be able to specify their type names in QML properties instead of using var because I've found the type safety to help a lot in finding mistakes. This all works fine for classes which are registered with QML but many of my classes are abstract and can't be registered. I tried using various qmlRegister* functions which didn't seem to do anything.

    Assuming that I can't do what I want and I have to use var, what are all of those qmlRegister* functions doing then? Especially qmlRegisterInterface which sounded like exactly what I needed.

    Thanks!

    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