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 Code modularization (re-use)
Forum Updated to NodeBB v4.3 + New Features

QML Code modularization (re-use)

Scheduled Pinned Locked Moved QML and Qt Quick
2 Posts 2 Posters 854 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
    Duff
    wrote on last edited by
    #1

    Hi
    It looks like Qt is making some really nice strides under Digia. I thought I would start playing with QML. I'm wondering how to go about modularizing qml files. For instance, what if I have two screens that have very different functionality and I want to separate them into different QML files or I have some code that I want to re-use often? How do I pull it all together?

    thnx

    Brian

    --Duff

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

      Put separate components into separate QML files. It's all written in the documentation. As long as the file name follows the convention (starts with upper case), QML will allow you to import that file and use it in your code straigt away.

      There are also more advanced options available, like creating custom component sets.

      (Z(:^

      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