在点击详情页和企业wifi在任务栏显示相应图标
This commit is contained in:
parent
557a8acc8a
commit
31d0c1ac41
|
@ -5,7 +5,7 @@
|
|||
#define MAIN_SIZE_EXPAND 400,500
|
||||
#define MAIN_SIZE_NARROW 400,400
|
||||
|
||||
EnterpriseWlanDialog::EnterpriseWlanDialog(KyWirelessNetItem &wirelessNetItem, QString device, QWidget *parent) : QDialog(parent)
|
||||
EnterpriseWlanDialog::EnterpriseWlanDialog(KyWirelessNetItem &wirelessNetItem, QString device, QWidget *parent) : QWidget(parent)
|
||||
{
|
||||
//设置窗口无边框,阴影
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 12, 0))
|
||||
|
@ -18,6 +18,7 @@ EnterpriseWlanDialog::EnterpriseWlanDialog(KyWirelessNetItem &wirelessNetItem, Q
|
|||
this->setWindowFlags(Qt::Dialog | Qt::FramelessWindowHint);
|
||||
#endif
|
||||
this->setAttribute(Qt::WA_DeleteOnClose);
|
||||
this->setWindowFlag(Qt::Window);
|
||||
|
||||
m_wirelessNetItem = wirelessNetItem;
|
||||
m_deviceName = device;
|
||||
|
@ -43,7 +44,7 @@ EnterpriseWlanDialog::~EnterpriseWlanDialog() {
|
|||
void EnterpriseWlanDialog::closeEvent(QCloseEvent *event)
|
||||
{
|
||||
emit this->enterpriseWlanDialogClose(false);
|
||||
return QDialog::closeEvent(event);
|
||||
return QWidget::closeEvent(event);
|
||||
}
|
||||
|
||||
void EnterpriseWlanDialog::initUI()
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
#include "kywirelessnetitem.h"
|
||||
#include "coninfo.h"
|
||||
|
||||
class EnterpriseWlanDialog : public QDialog
|
||||
class EnterpriseWlanDialog : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
|
|
|
@ -51,7 +51,7 @@ NetDetail::NetDetail(QString interface, QString name, QString uuid, bool isActiv
|
|||
isActive(isActive),
|
||||
isWlan(isWlan),
|
||||
m_isCreateNet(isCreateNet),
|
||||
QDialog(parent)
|
||||
QWidget(parent)
|
||||
{
|
||||
//设置窗口无边框,阴影
|
||||
//#if (QT_VERSION >= QT_VERSION_CHECK(5, 12, 0))
|
||||
|
@ -61,7 +61,8 @@ NetDetail::NetDetail(QString interface, QString name, QString uuid, bool isActiv
|
|||
// window_hints.decorations = MWM_DECOR_BORDER;
|
||||
// XAtomHelper::getInstance()->setWindowMotifHint(this->winId(), window_hints);
|
||||
//#else
|
||||
this->setWindowFlags(Qt::Dialog /*| Qt::FramelessWindowHint*/);
|
||||
// this->setWindowFlags(Qt::Dialog /*| Qt::FramelessWindowHint*/);
|
||||
this->setWindowFlag(Qt::Window);
|
||||
//#endif
|
||||
// this->setProperty("useStyleWindowManager", false); //禁用拖动
|
||||
// setWindowFlags(Qt::Dialog | Qt::FramelessWindowHint );
|
||||
|
@ -136,14 +137,14 @@ void NetDetail::onPaletteChanged()
|
|||
|
||||
void NetDetail::paintEvent(QPaintEvent *event)
|
||||
{
|
||||
return QDialog::paintEvent(event);
|
||||
return QWidget::paintEvent(event);
|
||||
}
|
||||
|
||||
void NetDetail::closeEvent(QCloseEvent *event)
|
||||
{
|
||||
emit this->detailPageClose(false);
|
||||
emit this->createPageClose(m_deviceName);
|
||||
return QDialog::closeEvent(event);
|
||||
return QWidget::closeEvent(event);
|
||||
}
|
||||
|
||||
void NetDetail::centerToScreen()
|
||||
|
@ -931,7 +932,7 @@ bool NetDetail::eventFilter(QObject *w, QEvent *event)
|
|||
}
|
||||
|
||||
}
|
||||
return QDialog::eventFilter(w, event);
|
||||
return QWidget::eventFilter(w, event);
|
||||
}
|
||||
|
||||
QPalette NetDetail::lightPalette() const
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
#include "coninfo.h"
|
||||
#include "tab-pages/tabpage.h"
|
||||
|
||||
class NetDetail : public QDialog
|
||||
class NetDetail : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
|
|
Loading…
Reference in New Issue