高dpi下移动窗口卡顿原因找到

//        QCoreApplication::sendEvent(this,new QEvent(QEvent::Type::Resize));
qt6
18650180552 2021-10-27 10:38:39 +08:00
parent 8efd1d63b9
commit e6eaef4a2c
1 changed files with 3 additions and 3 deletions

View File

@ -413,7 +413,7 @@ int QssMainWindow::CalCursorCol(QPoint pt)
} }
void QssMainWindow::onMouseMoveEvent( QMouseEvent * ev ) void QssMainWindow::onMouseMoveEvent(QMouseEvent * ev)
{ {
if (m_titleBar->maxOrRestore()) if (m_titleBar->maxOrRestore())
{ {
@ -586,7 +586,7 @@ bool QssMainWindow::eventFilter(QObject * obj, QEvent * ev){
} }
else if (obj == m_titleBar) 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) if (ev->type() == QEvent::Enter)
{ {
m_left = false; m_left = false;
@ -814,7 +814,7 @@ void QssDialog::onMouseMoveEvent( QMouseEvent * ev )
rc.setTop(rc.top() + dy); rc.setTop(rc.top() + dy);
if (m_bottom) if (m_bottom)
rc.setBottom(rc.bottom() + dy); rc.setBottom(rc.bottom() + dy);
qDebug()<<"onMouseMoveEvent"<<rc;
m_frame->setGeometry(rc); m_frame->setGeometry(rc);
mFrameRect = rc; mFrameRect = rc;
m_pos = ev->globalPos(); m_pos = ev->globalPos();