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. QT STYLE SHEET Heptagon Button

QT STYLE SHEET Heptagon Button

Scheduled Pinned Locked Moved Solved General and Desktop
5 Posts 3 Posters 500 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.
  • M Offline
    M Offline
    Marco Flad
    wrote on last edited by
    #1

    its possible to Make button like CSS button in QT STYLE SHEET as following alt text
    i done it in CSS

    clip-path: polygon(100% 37%, 100% 85%, 85% 100%, 0 100%, 0 36%);
    

    but i cant apply to qt style sheet

    JonBJ 1 Reply Last reply
    0
    • M Marco Flad

      @JonB said in QT STYLE SHEET Heptagon Button:

      nd I don'

      thank you i got it .
      but is there any way to make this Button in Qt Widgets ?

      VRoninV Offline
      VRoninV Offline
      VRonin
      wrote on last edited by
      #4

      @Marco-Flad said in QT STYLE SHEET Heptagon Button:

      is there any way to make this Button in Qt Widgets ?

      Yes, just call QWidget::setMask to set the "boundaries" of widgets

      "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
      ~Napoleon Bonaparte

      On a crusade to banish setIndexWidget() from the holy land of Qt

      JonBJ 1 Reply Last reply
      3
      • M Marco Flad

        its possible to Make button like CSS button in QT STYLE SHEET as following alt text
        i done it in CSS

        clip-path: polygon(100% 37%, 100% 85%, 85% 100%, 0 100%, 0 36%);
        

        but i cant apply to qt style sheet

        JonBJ Online
        JonBJ Online
        JonB
        wrote on last edited by
        #2

        @Marco-Flad
        QSS/Qt stylesheet is not CSS, like in HTML. It's just a subset of stuff Qt decided to define/implement. If the docs for example do not mention that clip-path is supported, it won't have any effect. And I don't see any clip on https://doc.qt.io/qt-5/stylesheet-reference.html....

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

          @JonB said in QT STYLE SHEET Heptagon Button:

          nd I don'

          thank you i got it .
          but is there any way to make this Button in Qt Widgets ?

          VRoninV 1 Reply Last reply
          0
          • M Marco Flad

            @JonB said in QT STYLE SHEET Heptagon Button:

            nd I don'

            thank you i got it .
            but is there any way to make this Button in Qt Widgets ?

            VRoninV Offline
            VRoninV Offline
            VRonin
            wrote on last edited by
            #4

            @Marco-Flad said in QT STYLE SHEET Heptagon Button:

            is there any way to make this Button in Qt Widgets ?

            Yes, just call QWidget::setMask to set the "boundaries" of widgets

            "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
            ~Napoleon Bonaparte

            On a crusade to banish setIndexWidget() from the holy land of Qt

            JonBJ 1 Reply Last reply
            3
            • VRoninV VRonin

              @Marco-Flad said in QT STYLE SHEET Heptagon Button:

              is there any way to make this Button in Qt Widgets ?

              Yes, just call QWidget::setMask to set the "boundaries" of widgets

              JonBJ Online
              JonBJ Online
              JonB
              wrote on last edited by
              #5

              @VRonin
              Wow, I didn't know there was. But that way is cheating!

              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