Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
A weird problem about qtchart,it will disappear when I drag window to another screen
Stephen INF last edited by Stephen INF
Recently,I refactored my code,it almost done,but QtChart works weird,have you ever met similar problems that something unexpected happened when move window to another screen?
I Have two scrren,here, call A and B.
For example,if program window generated in A,it works normal in A,however,if I move it to B,all openglwidgets of QtChart will disappear,even if I move it back to A,it still can't be seen.In turn,if generated in B,and move it to A,problems are same.
when It disappeard,I float（setWindowFlag(Qt::Window,true);） the little window containing qtChart,openglWidget will show,and I move the littlt window to another scrren,it works all right,But if I embed（setWindowFlag(Qt::Window,false);） it back to main window,openglWidget will disappear again.
Another problem is,after move window to another screen, when I hover mouse over the handle of QSplitter,CursorShape won't change,but splitter still works if drag the handle.
There are some settings below, but it should not be the reason for this question, because the previous version is same, but works right.
All windows are customized:
setWindowFlags(Qt::Window |Qt::FramelessWindowHint); setAttribute(Qt::WA_TranslucentBackground);
Capture pointer of openglWidget is only for screenshoot :
chart_ = new QChart; view_ = new QChartView(chart_); glTempSeries_ = new QLineSeries(this); glTempSeries_->setUseOpenGL(true); chart_->addSeries(glTempSeries_); glTempSeries_->attachAxis(axisX_); glTempSeries_->attachAxis(axisY_);![0_1553679399881_C.png](https://ddgobkiprc33d.cloudfront.net/b03fe2e4-6fd9-43d2-9c80-8d9d4cfd6ae0.png) glTempSeries_->setVisible(false); openglWidget_ = view_->findChild<QOpenGLWidget*>();
I really tried，but I still can't find why,any suggestions would be appreciated,thanks.