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. how to make the widget shadow with the qss style.
Qt 6.11 is out! See what's new in the release blog

how to make the widget shadow with the qss style.

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 603 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.
  • nicker playerN Offline
    nicker playerN Offline
    nicker player
    wrote on last edited by
    #1
    QWidget::shadow{
        color: blue;
        offSet: 2px,2px;
        blurRadius: 4px;
    }
    

    some one said the code may work.but nof for me.so is there any way that the qss style could make the shadow of the widget?

    Pl45m4P 1 Reply Last reply
    0
    • nicker playerN nicker player
      QWidget::shadow{
          color: blue;
          offSet: 2px,2px;
          blurRadius: 4px;
      }
      

      some one said the code may work.but nof for me.so is there any way that the qss style could make the shadow of the widget?

      Pl45m4P Offline
      Pl45m4P Offline
      Pl45m4
      wrote on last edited by Pl45m4
      #2

      @nicker-player said in how to make the widget shadow with the qss style.:

      QWidget::shadow

      There is neither a pseudo-state nor a sub-control with this name...
      Either it's a custom styled property or your "source" was talking bullsh*t :)

      QFrame::Shadow does exist for QFrame-based widgets.

      • https://doc.qt.io/qt-6/qframe.html#Shadow-enum

      Or look into QGraphicsDropShadowEffect (this was probably used in combination with the shadow property to configure it via stylesheet)


      If debugging is the process of removing software bugs, then programming must be the process of putting them in.

      ~E. W. Dijkstra

      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