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. Qml common files
Forum Updated to NodeBB v4.3 + New Features

Qml common files

Scheduled Pinned Locked Moved QML and Qt Quick
4 Posts 3 Posters 817 Views 3 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.
  • mrdebugM Offline
    mrdebugM Offline
    mrdebug
    wrote on last edited by
    #1

    Is there a way to define a common class where I can store constant variables and qml common functions?
    Can you give me an example about the common file and how I can include it in my qml files?

    Regards.

    Need programmers to hire?
    www.labcsp.com
    www.denisgottardello.it
    GMT+1
    Skype: mrdebug

    1 Reply Last reply
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      There is the QML singleton: from C++ or from QML.

      (Z(:^

      1 Reply Last reply
      0
      • ? Offline
        ? Offline
        A Former User
        wrote on last edited by
        #3

        Hi!
        Have a look at "Defining JavaScript Resources In QML" http://doc.qt.io/qt-5/qtqml-javascript-resources.html
        Cheers!

        1 Reply Last reply
        0
        • mrdebugM Offline
          mrdebugM Offline
          mrdebug
          wrote on last edited by
          #4

          Perfect!

          Need programmers to hire?
          www.labcsp.com
          www.denisgottardello.it
          GMT+1
          Skype: mrdebug

          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