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. Different sytle to Qaction in Qmenu
Qt 6.11 is out! See what's new in the release blog

Different sytle to Qaction in Qmenu

Scheduled Pinned Locked Moved Solved General and Desktop
5 Posts 3 Posters 1.8k 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.
  • Manohar_SLM Offline
    Manohar_SLM Offline
    Manohar_SL
    wrote on last edited by
    #1

    Hi folks,

    I have a QMenu with some menu action enabled and some disabled my requirement is at beginning all menu action should look same and on hover enabled actions should appear grey and disabled actions should appear transparent.
    Am able to achieve grey on hover over enabled action but on setting action disabled by default menu looks grey how can i solve this issue???

    Manohar SL
    Embedded Qt & QML Developer

    1 Reply Last reply
    1
    • Pradeep KumarP Offline
      Pradeep KumarP Offline
      Pradeep Kumar
      wrote on last edited by
      #2

      Hi,

      @Manohar_SL

      can u provide the screenshot and sample code snippet ,

      Thanks,

      Pradeep Kumar
      Qt,QML Developer

      Manohar_SLM 1 Reply Last reply
      1
      • Vinod KuntojiV Offline
        Vinod KuntojiV Offline
        Vinod Kuntoji
        wrote on last edited by
        #3

        @Manohar_SL

        U can try the following stylesheet.

        widget->setStyleSheet( "QToolBar{background-color:#000000;color:#ffffff;}"
        "QToolButton:hover{background-color:#999999;color:#ffffff;}"
        "QToolButton{background-color:#000000;color:#ffffff;height:30px;}"
        );

        C++, Qt, Qt Quick Developer,
        PthinkS, Bangalore

        1 Reply Last reply
        5
        • Pradeep KumarP Pradeep Kumar

          Hi,

          @Manohar_SL

          can u provide the screenshot and sample code snippet ,

          Thanks,

          Manohar_SLM Offline
          Manohar_SLM Offline
          Manohar_SL
          wrote on last edited by
          #4

          @Pradeep-Kumar Thank you for reply

          Am able to achieve, i was setting style sheet to QMenu Disabled property instead of toolbar.

          Manohar SL
          Embedded Qt & QML Developer

          1 Reply Last reply
          3
          • Pradeep KumarP Offline
            Pradeep KumarP Offline
            Pradeep Kumar
            wrote on last edited by Pradeep Kumar
            #5

            HI,

            @Manohar_SL

            is it solved , did u achieve ur desired result.?.

            Thanks,

            Pradeep Kumar
            Qt,QML Developer

            1 Reply Last reply
            1

            • Login

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