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. Adding QML into library with Qt6 and CMake. How?
Forum Updated to NodeBB v4.3 + New Features

Adding QML into library with Qt6 and CMake. How?

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

    Hello!

    Is there any way to add QML components and JS to add to library with CMake? Is there any examples?
    The global idea to share some universal QML components that written with pure QML and JS.

    JKSHJ 1 Reply Last reply
    0
    • B bogong

      Hello!

      Is there any way to add QML components and JS to add to library with CMake? Is there any examples?
      The global idea to share some universal QML components that written with pure QML and JS.

      JKSHJ Offline
      JKSHJ Offline
      JKSH
      Moderators
      wrote last edited by
      #2

      @bogong said in Adding QML into library with Qt6 and CMake. How?:

      Is there any way to add QML components and JS to add to library with CMake? Is there any examples?

      Yes: https://doc.qt.io/qt-6/qt6-modernize-qml-modules.html

      Simply load any Qt Quick example in Qt Creator to see how to use qt_add_qml_module(). This function can be used with a target that's created with qt_add_library().

      Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

      B 1 Reply Last reply
      2
      • JKSHJ JKSH

        @bogong said in Adding QML into library with Qt6 and CMake. How?:

        Is there any way to add QML components and JS to add to library with CMake? Is there any examples?

        Yes: https://doc.qt.io/qt-6/qt6-modernize-qml-modules.html

        Simply load any Qt Quick example in Qt Creator to see how to use qt_add_qml_module(). This function can be used with a target that's created with qt_add_library().

        B Offline
        B Offline
        bogong
        wrote last edited by
        #3

        @JKSH Thx. Will try it today.

        1 Reply Last reply
        0
        • B bogong has marked this topic as solved

        • Login

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