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. Stylesheet for app resets to default greys

Stylesheet for app resets to default greys

Scheduled Pinned Locked Moved Unsolved General and Desktop
5 Posts 3 Posters 654 Views 2 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
    MuleDeer
    wrote on last edited by
    #1

    I've been having a reoccurring problem where the applications style sheet seems to reset itself to default greys randomly and doesn't come back, anyone know a possible cause of this?
    Attached photos of normal style and after it resets itself.
    pyqt5 error2.png
    pyqt5 error1.png

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

      Hi and welcome to devnet,

      How, where and when are you setting the stylesheet ?

      Do you have several of them ?

      Are you recreating the problematic widget multiple times ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      M 1 Reply Last reply
      0
      • SGaistS SGaist

        Hi and welcome to devnet,

        How, where and when are you setting the stylesheet ?

        Do you have several of them ?

        Are you recreating the problematic widget multiple times ?

        M Offline
        M Offline
        MuleDeer
        wrote on last edited by
        #3

        @SGaist Hi, thanks.
        There is a stylesheet set in the MainWindow for most of these0089a349-cc36-4eb6-b972-956d88317b6e-image.png

        There are different style sheets on different QFrames below that too.
        Yes, this happens almost every time the application is run, at random times, and stays grey after it switches.

        Perhaps setting the style for these on the MainWindow is the issue?

        SGaistS 1 Reply Last reply
        0
        • M MuleDeer

          @SGaist Hi, thanks.
          There is a stylesheet set in the MainWindow for most of these0089a349-cc36-4eb6-b972-956d88317b6e-image.png

          There are different style sheets on different QFrames below that too.
          Yes, this happens almost every time the application is run, at random times, and stays grey after it switches.

          Perhaps setting the style for these on the MainWindow is the issue?

          SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Are you recreating some of these widgets ?
          Enable disable them ?
          Can you provide a minimal compilable example that shows this behaviour ?

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • H Offline
            H Offline
            Hardy91
            wrote on last edited by Hardy91
            #5

            Hi everyone, facing the similar issue, setting the various stylesheet after reading the QSS to the application level. And most of the time it is working perfectly, but suddenly it is broken. Don't know the reason. Did anyone know.
            even there is no particular step to reproduce it 100% time.
            Using Qt 5.15.1

            1 Reply Last reply
            0
            • H Hardy91 referenced this topic on
            • H Hardy91 referenced this topic on

            • Login

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