4

I tried to do: this->setStyleSheet("-webkit-box-shadow: 0px 0px 20px rgba(0, 0, 0, 1);") and I get the error: Unknown property -webkit-box-shadow. The same goes for box-shadow and -moz-box-shadow. Box-shadow, however, renders fine in a QWebView. Is there no way to add this effect to normal elements?

4
  • What kind of widget is this? Commented Dec 20, 2012 at 3:46
  • A custom widget which extends QFrame (it has no custom paint event) Commented Dec 20, 2012 at 4:08
  • Not all CSS works on qwidgets. QSS shares syntax and many properties with CSS for the web but is not identical Commented Dec 20, 2012 at 22:35
  • i think you want to QGraphicsDropShadowEffect check this out stackoverflow.com/questions/12328251/… Commented Jul 31, 2021 at 12:25

1 Answer 1

0

Have a look at the docs for QFrame. There's a frame shadow property.

http://doc.qt.io/qt-5/qframe.html#Shadow-enum

Sign up to request clarification or add additional context in comments.

1 Comment

it doesnt seem to be working: does this conflict with the stylesheets?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.