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. Make a module available to other apps
Forum Update on Monday, May 27th 2025

Make a module available to other apps

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
qmlsingletonstyling
7 Posts 2 Posters 1.3k Views
  • 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.
  • G Offline
    G Offline
    GrahamLa
    wrote on 6 Feb 2019, 10:56 last edited by
    #1

    Hi
    I have a Style singleton developed for a particular application and I would now like to use it other applications in order to get a common look and feel.
    How is this achieved?

    Thanks

    O 2 Replies Last reply 6 Feb 2019, 11:22
    0
    • G GrahamLa
      6 Feb 2019, 10:56

      Hi
      I have a Style singleton developed for a particular application and I would now like to use it other applications in order to get a common look and feel.
      How is this achieved?

      Thanks

      O Offline
      O Offline
      ODБOï
      wrote on 6 Feb 2019, 11:22 last edited by
      #2

      hi,
      @GrahamLa said in Make a module available to other apps:

      Style singleton

      What is your style singleton ? a .js file ?

      G 1 Reply Last reply 6 Feb 2019, 11:26
      0
      • O ODБOï
        6 Feb 2019, 11:22

        hi,
        @GrahamLa said in Make a module available to other apps:

        Style singleton

        What is your style singleton ? a .js file ?

        G Offline
        G Offline
        GrahamLa
        wrote on 6 Feb 2019, 11:26 last edited by
        #3

        @LeLev
        No it is a QML file

        pragma Singleton
        import QtQuick 2.0
        
        QtObject {
        
            property color subsectionlabelColor: "white"
            property color appSectionTitleColor: "white"
            property int  fontsize: 18
        }
        

        My final goal is to have a file similar to a qt qss file that can be changed 'on the fly' between runs of the application and see the changes immediately.

        1 Reply Last reply
        0
        • G GrahamLa
          6 Feb 2019, 10:56

          Hi
          I have a Style singleton developed for a particular application and I would now like to use it other applications in order to get a common look and feel.
          How is this achieved?

          Thanks

          O Offline
          O Offline
          ODБOï
          wrote on 6 Feb 2019, 13:34 last edited by
          #4

          @GrahamLa said in Make a module available to other apps:

          I would now like to use it other applications

          import the file and use it just like in the first app

          @GrahamLa said in Make a module available to other apps:

          on the fly

          for me this is runtime, but you are saying "between runs of the application"

          G 1 Reply Last reply 6 Feb 2019, 13:39
          0
          • O ODБOï
            6 Feb 2019, 13:34

            @GrahamLa said in Make a module available to other apps:

            I would now like to use it other applications

            import the file and use it just like in the first app

            @GrahamLa said in Make a module available to other apps:

            on the fly

            for me this is runtime, but you are saying "between runs of the application"

            G Offline
            G Offline
            GrahamLa
            wrote on 6 Feb 2019, 13:39 last edited by
            #5

            @LeLev
            Thanks
            With one of our existing Qt Widgets projects we are able to change a qss file and simply re run the application to see our changes.
            So far I have been unable to achieve this - but it is early days, I assume that this is possible?

            O 1 Reply Last reply 6 Feb 2019, 13:44
            0
            • G GrahamLa
              6 Feb 2019, 13:39

              @LeLev
              Thanks
              With one of our existing Qt Widgets projects we are able to change a qss file and simply re run the application to see our changes.
              So far I have been unable to achieve this - but it is early days, I assume that this is possible?

              O Offline
              O Offline
              ODБOï
              wrote on 6 Feb 2019, 13:44 last edited by
              #6

              @GrahamLa I only have a very little experience with Widgets.

              In Qt Quick Style Singleton approach allows you to do that.
              Even at runtime

              G 1 Reply Last reply 6 Feb 2019, 13:46
              0
              • O ODБOï
                6 Feb 2019, 13:44

                @GrahamLa I only have a very little experience with Widgets.

                In Qt Quick Style Singleton approach allows you to do that.
                Even at runtime

                G Offline
                G Offline
                GrahamLa
                wrote on 6 Feb 2019, 13:46 last edited by
                #7

                @LeLev
                Ok - looks like I need to follow that up

                1 Reply Last reply
                0

                7/7

                6 Feb 2019, 13:46

                • Login

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