Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Using unic Stylesheet file and Qt Designer

Using unic Stylesheet file and Qt Designer

Scheduled Pinned Locked Moved Solved Qt Creator and other tools
stylesheetqtdesignerqsscss
9 Posts 2 Posters 5.5k 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.
  • Romain CR Offline
    Romain CR Offline
    Romain C
    wrote on last edited by A Former User
    #1

    Hi everyone,
    I'm working from few days on a application based on Qt.
    This application have différents styles inside ui files and in the code so I decided to unified all this "style ressources" in one file named style.qss.
    After that, on the app instance I apply with setStyleSheet my file.

    Everything works fine, except that in Qt Designer style are not applied (seems logic, he don't know where to find this information).

    Is there a way to set this stylesheet information to Qt Designer?
    If no, can it be in the future an improvement of Qt Designer?

    Best regards,
    Romain

    1 Reply Last reply
    0
    • mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi
      As far as I found, there is no method to set a stylesheet globally in Creator.
      You can only set pr top widget, and it applies to all children.
      Like setting on MainWindow and all children is affected
      but it won't affect other UI files not having Mainwindow as parent.
      ( like parent less Dialog)
      (right click MainWindow and select Change stylesheet)

      • no, can it be in the future an improvement of QT Designer?
        Yes it could but we are user oriented forum and the Devs would not see such suggestions here.
        You could open a ticket on https://bugreports.qt.io and we can vote on it.
        Remember to flag it as Improvement.
      Romain CR 1 Reply Last reply
      0
      • mrjjM mrjj

        Hi
        As far as I found, there is no method to set a stylesheet globally in Creator.
        You can only set pr top widget, and it applies to all children.
        Like setting on MainWindow and all children is affected
        but it won't affect other UI files not having Mainwindow as parent.
        ( like parent less Dialog)
        (right click MainWindow and select Change stylesheet)

        • no, can it be in the future an improvement of QT Designer?
          Yes it could but we are user oriented forum and the Devs would not see such suggestions here.
          You could open a ticket on https://bugreports.qt.io and we can vote on it.
          Remember to flag it as Improvement.
        Romain CR Offline
        Romain CR Offline
        Romain C
        wrote on last edited by
        #3

        @mrjj Ok, so as you suggest I add a ticket at this adress: https://bugreports.qt.io/browse/QTCREATORBUG-17351
        I hope it will be considered on day.
        Thanks!

        mrjjM 1 Reply Last reply
        1
        • Romain CR Romain C

          @mrjj Ok, so as you suggest I add a ticket at this adress: https://bugreports.qt.io/browse/QTCREATORBUG-17351
          I hope it will be considered on day.
          Thanks!

          mrjjM Offline
          mrjjM Offline
          mrjj
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @Romain-C
          Hi, super.
          Maybe a slightly better description. ?

          Each widget do have a StyleSheet editor but you cannot tell
          Creator/Designer a global one so if you make a new UI files the stylesheet
          would already be there.

          So I assume what you are after is a global style sheet setting that show in Designer preview for
          all UI files without u setting the styleshett manually.

          Romain CR 1 Reply Last reply
          1
          • mrjjM mrjj

            @Romain-C
            Hi, super.
            Maybe a slightly better description. ?

            Each widget do have a StyleSheet editor but you cannot tell
            Creator/Designer a global one so if you make a new UI files the stylesheet
            would already be there.

            So I assume what you are after is a global style sheet setting that show in Designer preview for
            all UI files without u setting the styleshett manually.

            Romain CR Offline
            Romain CR Offline
            Romain C
            wrote on last edited by
            #5

            @mrjj Hey! Tell me if it seem clearer to you! I have pick some of your comment!
            I'm a little bit in english, if you see some inexact terms....
            I put this topic as closed?

            mrjjM 1 Reply Last reply
            1
            • Romain CR Romain C

              @mrjj Hey! Tell me if it seem clearer to you! I have pick some of your comment!
              I'm a little bit in english, if you see some inexact terms....
              I put this topic as closed?

              mrjjM Offline
              mrjjM Offline
              mrjj
              Lifetime Qt Champion
              wrote on last edited by
              #6

              @Romain-C
              Yes it seems more clear.
              Your english is fine. It was just so there were enough details for the Dev to understand
              what it is about. :)
              Yes please do close it.

              mrjjM 1 Reply Last reply
              1
              • mrjjM mrjj

                @Romain-C
                Yes it seems more clear.
                Your english is fine. It was just so there were enough details for the Dev to understand
                what it is about. :)
                Yes please do close it.

                mrjjM Offline
                mrjjM Offline
                mrjj
                Lifetime Qt Champion
                wrote on last edited by mrjj
                #7

                Oh, if u cannot find Solved.
                Then in first Post u made. Click Topic Button. Then click "Ask as Question"
                and then there is a mark as "Solved"
                alt text

                1 Reply Last reply
                0
                • Romain CR Offline
                  Romain CR Offline
                  Romain C
                  wrote on last edited by
                  #8

                  Thanks! Exactly what I'm trying to find! =D

                  mrjjM 1 Reply Last reply
                  0
                  • Romain CR Romain C

                    Thanks! Exactly what I'm trying to find! =D

                    mrjjM Offline
                    mrjjM Offline
                    mrjj
                    Lifetime Qt Champion
                    wrote on last edited by
                    #9

                    @Romain-C
                    Well it still confused me sometimes :)

                    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