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. Loading QML files inside QmlElement
Forum Updated to NodeBB v4.3 + New Features

Loading QML files inside QmlElement

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
1 Posts 1 Posters 207 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.
  • K Offline
    K Offline
    Klaus Derryk
    wrote on last edited by
    #1

    (I'm using Qt for Python - Pyside6)
    What I want to achieve is the following:
    The main application only loads a main.qml file. In the main.qml I want to specify a QmlElement like CustomComponent01.
    This Custom component should consist of a .qml file itself. This works fine when CustomComponent01 is only a .qml file itself however, I couldn't get it to work using a python class that loads the .qml file. My problem here is not that I can't get QML to recognize my python file (this works fine) but I couldn't figure out how to load the components in python and add them to my class (that I inherited from QWidget). I tried using QQmlComponent but didn't really figure out how that is supposed to work.

    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