解决国产系统因某些qt版本不一致,导致QPainter的某个枚举值不支持的问题

This commit is contained in:
yangjiaxuan 2023-09-28 16:43:49 +08:00
parent d1b21e6f0d
commit c2a7deb982
1 changed files with 4 additions and 0 deletions

View File

@ -1641,7 +1641,11 @@ void HGImgView::paintEvent(QPaintEvent* e)
painter.drawImage(destRect, *m_qImage, srcRect);
#else
QRectF destRect(m_showRect.left, m_showRect.top, m_showRect.right - m_showRect.left, m_showRect.bottom - m_showRect.top);
#if defined(HG_CMP_MSC)
painter.setRenderHint(m_enableHighQuality ? QPainter::SmoothPixmapTransform : QPainter::LosslessImageRendering);
#endif
painter.drawImage(destRect, *m_qImage);
#endif