Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. A weird problem about qtchart,it will disappear when I drag window to another screen
Forum Updated to NodeBB v4.3 + New Features

A weird problem about qtchart,it will disappear when I drag window to another screen

Scheduled Pinned Locked Moved Unsolved General and Desktop
qtchartqopenglwidget
1 Posts 1 Posters 615 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Stephen INFS Offline
    Stephen INFS Offline
    Stephen INF
    wrote on last edited by Stephen INF
    #1

    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.

    Something Weird:

    • 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.

    0_1553675966328_A.png

    0_1553676385309_B.png

    0_1553679429068_C.png
    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.

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved