1
0
mirror of https://gitee.com/drabel/LibQQt.git synced 2025-01-04 10:18:44 +08:00
tianduanrui a1202779c2 更新QQtShadowWidget的功能。
可以是主窗口,也可以是子控件。
qqtwindowattribute提供shadow效果只能应用于子控件。
2019-09-01 14:39:26 +08:00

47 lines
928 B
C++
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#include "mainwindow.h"
#include <QQtApplication>
#include <testshadowwidget.h>
#include <testshadowwidget2.h>
#include <testshadowwidget3.h>
#include <qqtshadowwidget.h>
int main ( int argc, char* argv[] )
{
QQtApplication a ( argc, argv );
//shadow测试后全都不管用。
//MainWindow w;
//w.show();
#if 0
//shadow 不管用
TestShadowWidget w;
w.show();
#endif
#if 0
//shadow 实现。需要美化下效果。
TestShadowWidget2 w;
w.show();
#endif
#if 0
//shadow 发黑。里边正常。
TestShadowWidget3 w;
w.show();
#endif
#if 1
//shadow 管用
QQtShadowWidget* w = new QQtShadowWidget();
//w->setWindowFlag ( Qt::FramelessWindowHint, true );
//w->setAttribute ( Qt::WA_TranslucentBackground, true );
w->setGeometry ( 400, 500, 800, 600 );
w->show();
#endif
return a.exec();
}