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. Reusable QML Module and Type.
Forum Updated to NodeBB v4.3 + New Features

Reusable QML Module and Type.

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
2 Posts 1 Posters 207 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.
  • M Offline
    M Offline
    Mesrine
    wrote on 30 Nov 2023, 19:38 last edited by
    #1

    Hello everyone,
    I am working on creating reusable QML modules.
    For example DateTime pickers QML types.

    The thing is that I want to create many QML types that select date and time like in this page.

    But If my custom QML Type contains a button, then if someone uses the module in a bigger project with some nice design for the buttons, this will break the style of the app.

    My approach for solving this is to have a custom Style in a custom Module called MyDesigns.
    The custom Design has a type called MyButton.
    So for all my other reusable modules that contain a button, I use the MyButton type.

    If someone just wants to use my reusable modules,
    They could use my MyDesigns module or create a module with the same name MyDesigns with a MyButton type that does not break the style of their app.

    Is there a better way to do this?

    M 1 Reply Last reply 1 Dec 2023, 11:21
    0
    • M Mesrine
      30 Nov 2023, 19:38

      Hello everyone,
      I am working on creating reusable QML modules.
      For example DateTime pickers QML types.

      The thing is that I want to create many QML types that select date and time like in this page.

      But If my custom QML Type contains a button, then if someone uses the module in a bigger project with some nice design for the buttons, this will break the style of the app.

      My approach for solving this is to have a custom Style in a custom Module called MyDesigns.
      The custom Design has a type called MyButton.
      So for all my other reusable modules that contain a button, I use the MyButton type.

      If someone just wants to use my reusable modules,
      They could use my MyDesigns module or create a module with the same name MyDesigns with a MyButton type that does not break the style of their app.

      Is there a better way to do this?

      M Offline
      M Offline
      Mesrine
      wrote on 1 Dec 2023, 11:21 last edited by
      #2

      @Mesrine

      I found this nice explanation.
      Let's see if can make it work.

      1 Reply Last reply
      0

      2/2

      1 Dec 2023, 11:21

      • Login

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