1
0
mirror of https://gitee.com/drabel/LibQQt.git synced 2025-01-04 10:18:44 +08:00
LibQQt/src/frame/qqtdialog.cpp
2017-11-16 23:40:18 +08:00

32 lines
931 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 "qqtdialog.h"
#include "qqtcore.h"
#include <QIcon>
QQtDialog::QQtDialog(QWidget* parent) :
QDialog(parent)
{
/*
* 阻挡父亲窗口内其他控件除非本dialog关闭 show的功能强大起来 可以使用输入法
*/
setWindowModality(Qt::WindowModal);
#if 0
setWindowFlags(Qt::FramelessWindowHint | windowFlags());
setAttribute(Qt::WA_TranslucentBackground, true);
QPalette plt = palette();
plt.setColor(QPalette::Normal, QPalette::Shadow, QColor(255, 149, 12, 255));
plt.setColor(QPalette::Normal, QPalette::Window, QColor(255, 255, 255, 255));
setPalette(plt);
#endif
setAttribute(Qt::WA_DeleteOnClose, false);
setAttribute(Qt::WA_StyledBackground, true);
setWindowFlags(windowFlags() | Qt::WindowCloseButtonHint | Qt::WindowTitleHint | Qt::CustomizeWindowHint);
setWindowIcon(QIcon("./skin/default/bk_logo.ico"));
}
QQtDialog::~QQtDialog()
{
}