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. QtQuick Plugin with private classes

QtQuick Plugin with private classes

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
qtquickqmlc++plugin
3 Posts 2 Posters 1.3k Views 2 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.
  • shavS Offline
    shavS Offline
    shav
    wrote on last edited by
    #1

    Hi everyone!

    I have a question about Qt Quick plugin. I have a project with Qt Quick plugin which uses C++ classes also I'm using .qrc file to save a QML component which I must using in QML files. When I'm importing plugin to application I could use C++ classes and QML files from plugin. But I want use only QML files but not C++ classes. The question is: How I could hide C++ classes for application's QML files but use in QML files which exist inside my plugin? Is this possible?

    Mac OS and iOS Developer

    p3c0P 1 Reply Last reply
    0
    • shavS shav

      Hi everyone!

      I have a question about Qt Quick plugin. I have a project with Qt Quick plugin which uses C++ classes also I'm using .qrc file to save a QML component which I must using in QML files. When I'm importing plugin to application I could use C++ classes and QML files from plugin. But I want use only QML files but not C++ classes. The question is: How I could hide C++ classes for application's QML files but use in QML files which exist inside my plugin? Is this possible?

      p3c0P Offline
      p3c0P Offline
      p3c0
      Moderators
      wrote on last edited by p3c0
      #2

      @shav If I understood you correctly, you can create a proxy class which will internally call the other C++ classes. Keep the objects to these C++ classes as private in your proxy class. And finally register only the proxy class so as to be used from QML. I have done a similar one here. The proxy class internally calls this class and is registered here.

      157

      1 Reply Last reply
      0
      • shavS Offline
        shavS Offline
        shav
        wrote on last edited by
        #3

        Hi,

        Thanks for the replay! I'll try this.

        Mac OS and iOS Developer

        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