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. QMenu tearoff - hover css not working
QtWS25 Last Chance

QMenu tearoff - hover css not working

Scheduled Pinned Locked Moved Unsolved General and Desktop
qmenuqstylesheet
4 Posts 2 Posters 446 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.
  • D Offline
    D Offline
    Dariusz
    wrote on 18 Jan 2022, 11:55 last edited by
    #1

    Hey

    Any idea why this would not work?

    QMenu::tearoff:hover
    {
           margin-top:6px;
           padding-top:3px;
         color : red;
         border: 20px dashed rgb(200,200,200);
    }
    

    Tia

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 18 Jan 2022, 20:50 last edited by
      #2

      Hi,

      Can you show how exactly you are setting your stylesheet ?
      Which version of Qt are you using ?
      On which platform ?

      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
      • D Offline
        D Offline
        Dariusz
        wrote on 19 Jan 2022, 11:05 last edited by
        #3

        Qt 6.1+
        Win10x64
        QApplication::setStyleSheet(file.readAll());
        I set it on an app.
        Also half of my fonts dont respect my QApplicationFont either.
        MenuBar ignores it + some other widgets. Bit of a hit and miss in general.

        1 Reply Last reply
        0
        • S Offline
          S Offline
          SGaist
          Lifetime Qt Champion
          wrote on 19 Jan 2022, 20:34 last edited by
          #4

          Depending on how your wrote your stylesheet it will take precedence on the rest of your changes.

          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

          1/4

          18 Jan 2022, 11:55

          • Login

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