Mac下有QOpenGLWidget情况下的程序拖动问题
retamia opened this issue · 3 comments
retamia commented
retamia commented
NSWindowStyleMaskFullSizeContentView 去掉这个style就不会出现这问题
retamia commented
retamia commented
解决这问题了。在窗口移动的事件里面加下面代码
`
void CFramelessWindow::moveEvent(QMoveEvent *event)
{
NSView *view = (NSView *)this->winId();
if (view.layer == nil)
return QWidget::moveEvent(event);
QDesktopWidget *desktop = QApplication::desktop();
int curMonitor = desktop->screenNumber(this);
CGFloat ratio = (CGFloat)QApplication::desktop()->screen(curMonitor)->devicePixelRatio();
[view.layer setContentsScale: ratio];
}
`