no message

qt6
zcy 2022-02-11 17:01:02 +08:00
parent 4490a55f31
commit d3139ba090
1 changed files with 7 additions and 7 deletions

14
Qss.cpp
View File

@ -176,9 +176,9 @@ void QssTtitleBar::mouseMoveEvent( QMouseEvent * ev )
QPoint movePt = globalPt - m_pressedPos;
parentWidget()->move(movePt);
QssMainWindow *parent = static_cast<QssMainWindow*>(parentWidget());
if(nullptr != parent){
parent->DetectDpiChange();
}
// if(nullptr != parent){
// parent->DetectDpiChange();
// }
return ;
}
@ -270,10 +270,10 @@ void QssMainWindow::LogicalDpiChange(qreal dpi)
qDebug()<<"dpi changed,reason: configuration "<<dpi;
m_dpi_ratio = 96/dpi;
qDebug()<<"factor is "<<m_dpi_ratio;
auto parent = this->parentWidget();
parent->setGeometry(parent->geometry().x(),parent->geometry().y(),
parent->geometry().width()*m_dpi_ratio,
parent->geometry().height()*m_dpi_ratio);
// auto parent = this->parentWidget();
// parent->setGeometry(parent->geometry().x(),parent->geometry().y(),
// parent->geometry().width()*m_dpi_ratio,
// parent->geometry().height()*m_dpi_ratio);
}