정리

'framelesswindowhint.'에 해당되는 글 1건

  1. Drop Shadow Effect

Drop Shadow Effect

저장소/Qt

frameless windows에 drop shadow 효과 주는 방법



원문 출처 : stackoverflow

http://stackoverflow.com/questions/12347776/how-to-put-a-shadow-to-a-frameless-window-in-qt



Q: How to put a shadow to a Frameless window in Qt


A: 

Add a "QWidget" (say widget) to the MainWindow and move everything that's on the MainWindow to the widget. Then do this:

setAttribute(Qt::WA_TranslucentBackground); //enable MainWindow to be transparent

QGraphicsDropShadowEffect* effect = new QGraphicsDropShadowEffect();
effect->setBlurRadius(5);
ui->widget->setGraphicsEffect(effect);

This seems to work for me. See:

illusion of a main window having a shadow

'저장소 > Qt' 카테고리의 다른 글

Style Sheet Syntax : Selector  (0) 2013.11.27
Qt Style Sheets (Qt 5.1)  (0) 2013.11.22
QImage, QPixmap의 loadFromData, bitmap image header, resource dll  (0) 2013.10.30
widget 프레임 제거와 배경 투명화  (0) 2013.10.30
이미지 버튼  (0) 2013.10.30