diff --git a/Qss.cpp b/Qss.cpp index 496c5b7..db255b3 100644 --- a/Qss.cpp +++ b/Qss.cpp @@ -92,7 +92,6 @@ QssTtitleBar::QssTtitleBar(QWidget *parent , QFile file(":/qss/css/QssTitleBar.css"); if (!file.open(QIODevice::ReadOnly)){ qDebug()<<"error bar"; - exit(0); } QTextStream in(&file); QString css = in.readAll(); @@ -279,7 +278,6 @@ QssMainWindow::QssMainWindow(QWidget *parent/* = 0*/, Qt::WindowFlags flags/* = QFile file(":/qss/css/QssMainWindow.css"); if (!file.open(QIODevice::ReadOnly)){ qDebug()<<"error bar"; - exit(0); } QTextStream in(&file); QString css = in.readAll(); @@ -415,7 +413,7 @@ int QssMainWindow::CalCursorCol(QPoint pt) } -void QssMainWindow::onMouseMoveEvent( QMouseEvent * ev ) +void QssMainWindow::onMouseMoveEvent(QMouseEvent * ev) { if (m_titleBar->maxOrRestore()) { @@ -588,7 +586,7 @@ bool QssMainWindow::eventFilter(QObject * obj, QEvent * ev){ } else if (obj == m_titleBar) { - QCoreApplication::sendEvent(this,new QEvent(QEvent::Type::Resize)); +// QCoreApplication::sendEvent(this,new QEvent(QEvent::Type::Resize)); if (ev->type() == QEvent::Enter) { m_left = false; @@ -816,7 +814,7 @@ void QssDialog::onMouseMoveEvent( QMouseEvent * ev ) rc.setTop(rc.top() + dy); if (m_bottom) rc.setBottom(rc.bottom() + dy); - + qDebug()<<"onMouseMoveEvent"<setGeometry(rc); mFrameRect = rc; m_pos = ev->globalPos(); diff --git a/Qss.h b/Qss.h index bcc70ed..71c8a59 100644 --- a/Qss.h +++ b/Qss.h @@ -26,7 +26,9 @@ class QPushButton; class QLabel; class QMouseEvent; #define STANDARD_DPI 96.0 +#ifndef WM_DPICHANGED #define WM_DPICHANGED 0x02e0 +#endif typedef enum{