Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Qdial stylesheet doesn't work
Forum Updated to NodeBB v4.3 + New Features

Qdial stylesheet doesn't work

Scheduled Pinned Locked Moved Unsolved General and Desktop
12 Posts 2 Posters 926 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.
  • L Offline
    L Offline
    Ludicrous Gray
    wrote on last edited by
    #1

    Hello, I just recently started to learn using Qt and I stumble on some difficulties using the Stylesheet on Qdial. I plan to use the Qdial as color dial picker, something like this Color Dial

    I found something similar on Qdial's gradient style section with the name of rainbow. I already choose it and there are no error with it but there are no change at all to the Qdial's color. I already try to check the autofillbackground but nothing happen too. Maybe someone can point where I do it wrongly for this. Thank you

    jsulmJ 1 Reply Last reply
    0
    • L Ludicrous Gray

      Hello, I just recently started to learn using Qt and I stumble on some difficulties using the Stylesheet on Qdial. I plan to use the Qdial as color dial picker, something like this Color Dial

      I found something similar on Qdial's gradient style section with the name of rainbow. I already choose it and there are no error with it but there are no change at all to the Qdial's color. I already try to check the autofillbackground but nothing happen too. Maybe someone can point where I do it wrongly for this. Thank you

      jsulmJ Online
      jsulmJ Online
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @Ludicrous-Gray You will need to show your code where you're setting the style-sheet

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • L Offline
        L Offline
        Ludicrous Gray
        wrote on last edited by Ludicrous Gray
        #3

        @jsulm Hi, I still haven't gone to the code yet, I only try to place it all together using Qtdesigner. Do I need to change it via code to work?

        jsulmJ 1 Reply Last reply
        0
        • L Ludicrous Gray

          @jsulm Hi, I still haven't gone to the code yet, I only try to place it all together using Qtdesigner. Do I need to change it via code to work?

          jsulmJ Online
          jsulmJ Online
          jsulm
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @Ludicrous-Gray But you can at least show the style-sheet you're setting in designer?

          https://forum.qt.io/topic/113070/qt-code-of-conduct

          L 1 Reply Last reply
          0
          • jsulmJ jsulm

            @Ludicrous-Gray But you can at least show the style-sheet you're setting in designer?

            L Offline
            L Offline
            Ludicrous Gray
            wrote on last edited by
            #5

            @jsulm is this what you mean ? Style Sheet

            jsulmJ 1 Reply Last reply
            0
            • L Ludicrous Gray

              @jsulm is this what you mean ? Style Sheet

              jsulmJ Online
              jsulmJ Online
              jsulm
              Lifetime Qt Champion
              wrote on last edited by
              #6

              @Ludicrous-Gray Yes. Take a look at https://stackoverrun.com/de/q/5722750 - it is in German, but there is style sheet which is doing something similar. Compare it with yours.

              https://forum.qt.io/topic/113070/qt-code-of-conduct

              L 1 Reply Last reply
              0
              • jsulmJ jsulm

                @Ludicrous-Gray Yes. Take a look at https://stackoverrun.com/de/q/5722750 - it is in German, but there is style sheet which is doing something similar. Compare it with yours.

                L Offline
                L Offline
                Ludicrous Gray
                wrote on last edited by
                #7

                @jsulm Hi, I have read the link that you gave to me and I understand a little bit how the code should work so I tried to experiment creating a simple gradient from light to dark and to light again using this code

                color: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:0, stop:0 #fafafa, stop:0.5 #2e2e2e);
                

                but same as before it doesn't change anything, even on preview mode. It feels like the code isn't executed at all

                jsulmJ 1 Reply Last reply
                0
                • L Ludicrous Gray

                  @jsulm Hi, I have read the link that you gave to me and I understand a little bit how the code should work so I tried to experiment creating a simple gradient from light to dark and to light again using this code

                  color: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:0, stop:0 #fafafa, stop:0.5 #2e2e2e);
                  

                  but same as before it doesn't change anything, even on preview mode. It feels like the code isn't executed at all

                  jsulmJ Online
                  jsulmJ Online
                  jsulm
                  Lifetime Qt Champion
                  wrote on last edited by jsulm
                  #8

                  @Ludicrous-Gray Hint: style-sheets are case sensitive as far as I know
                  Also, what you have is different to what is in that link.

                  https://forum.qt.io/topic/113070/qt-code-of-conduct

                  L 1 Reply Last reply
                  0
                  • jsulmJ jsulm

                    @Ludicrous-Gray Hint: style-sheets are case sensitive as far as I know
                    Also, what you have is different to what is in that link.

                    L Offline
                    L Offline
                    Ludicrous Gray
                    wrote on last edited by
                    #9

                    @jsulm The link that you gave said that he can only change the color of the background only, every other choice is not working. So I did a simple test for background-color and it is working but what I want is the color of the circle not the background. The bug report on that post also show that the problem is closed and probably fixed on future update. So does this mean this is still not yet fixed?

                    jsulmJ 1 Reply Last reply
                    0
                    • L Ludicrous Gray

                      @jsulm The link that you gave said that he can only change the color of the background only, every other choice is not working. So I did a simple test for background-color and it is working but what I want is the color of the circle not the background. The bug report on that post also show that the problem is closed and probably fixed on future update. So does this mean this is still not yet fixed?

                      jsulmJ Online
                      jsulmJ Online
                      jsulm
                      Lifetime Qt Champion
                      wrote on last edited by jsulm
                      #10

                      @Ludicrous-Gray According to the bug ticket it is not fixed and will not be fixed.
                      Just a suggestion: if you need such amount of customisation you should take a look at QML, it provides way more possibilities than old style widgets.

                      https://forum.qt.io/topic/113070/qt-code-of-conduct

                      L 1 Reply Last reply
                      0
                      • jsulmJ jsulm

                        @Ludicrous-Gray According to the bug ticket it is not fixed and will not be fixed.
                        Just a suggestion: if you need such amount of customisation you should take a look at QML, it provides way more possibilities than old style widgets.

                        L Offline
                        L Offline
                        Ludicrous Gray
                        wrote on last edited by Ludicrous Gray
                        #11

                        @jsulm So does this QML has a designer like interface or I can only do it via code?

                        jsulmJ 1 Reply Last reply
                        0
                        • L Ludicrous Gray

                          @jsulm So does this QML has a designer like interface or I can only do it via code?

                          jsulmJ Online
                          jsulmJ Online
                          jsulm
                          Lifetime Qt Champion
                          wrote on last edited by
                          #12

                          @Ludicrous-Gray Well, the bug report says that QDial does not support style sheets at all, so doesn't matter where you set it it will not work...

                          https://forum.qt.io/topic/113070/qt-code-of-conduct

                          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