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. QDockWidget ::Title Stylesheet works in Designer but not in runtime
Forum Updated to NodeBB v4.3 + New Features

QDockWidget ::Title Stylesheet works in Designer but not in runtime

Scheduled Pinned Locked Moved Solved General and Desktop
5 Posts 3 Posters 622 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
    mp81
    wrote on last edited by
    #1

    The picture shows my problem, the title from a QDockWidget is different at runtime. I use qt 5.11.2, Win10 x64 is used. Any ideas? Thanks!

    QDockWidget { color: blue; font-size: 20pt; font-family: "Bauhaus 93"}  QDockWidget::Title { background: yellow; text-align: center; }
    

    0_1560921362490_2019-06-18 14_39_34-mainwindow.ui @ ScoreStyleEnvironment - Qt Creator.png

    jsulmJ 1 Reply Last reply
    0
    • M Offline
      M Offline
      mp81
      wrote on last edited by
      #5

      It´s working with 5.12.4 -> so this was a bug in 5.11.2!
      Thanks for testing!

      1 Reply Last reply
      2
      • M mp81

        The picture shows my problem, the title from a QDockWidget is different at runtime. I use qt 5.11.2, Win10 x64 is used. Any ideas? Thanks!

        QDockWidget { color: blue; font-size: 20pt; font-family: "Bauhaus 93"}  QDockWidget::Title { background: yellow; text-align: center; }
        

        0_1560921362490_2019-06-18 14_39_34-mainwindow.ui @ ScoreStyleEnvironment - Qt Creator.png

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

        @mp81 Hi and welcome!

        I can't see the picture.
        Can you show how you're setting stylesheet at runtime?

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

        1 Reply Last reply
        0
        • M Offline
          M Offline
          mp81
          wrote on last edited by
          #3

          Hi, the stylesheet is not set at runtime, it is done in the Designer. I tried to set it at runtime too, no success.
          I uploaded the image directly, it is visible for me?

          Thanks !

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

            Hi
            I can see the image.
            I tried your stylesheet in clean project. ( applied on the mainwindow)
            alt text

            Maybe you have other stylesheet targeting widget with font setting that override for
            DockWidget also?

            1 Reply Last reply
            3
            • M Offline
              M Offline
              mp81
              wrote on last edited by
              #5

              It´s working with 5.12.4 -> so this was a bug in 5.11.2!
              Thanks for testing!

              1 Reply Last reply
              2

              • Login

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