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. When the dialog pops up, the chart series is drawn over the dialog.
Forum Updated to NodeBB v4.3 + New Features

When the dialog pops up, the chart series is drawn over the dialog.

Scheduled Pinned Locked Moved Unsolved General and Desktop
16 Posts 2 Posters 1.2k 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.
  • Christian EhrlicherC Offline
    Christian EhrlicherC Offline
    Christian Ehrlicher
    Lifetime Qt Champion
    wrote on last edited by
    #3

    Without a minimal, compilable example we can't say if it's a bug in Qt or on your side. I would guess it's on your side.

    Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
    Visit the Qt Academy at https://academy.qt.io/catalog

    I 2 Replies Last reply
    0
    • Christian EhrlicherC Christian Ehrlicher

      Without a minimal, compilable example we can't say if it's a bug in Qt or on your side. I would guess it's on your side.

      I Offline
      I Offline
      IknowQT
      wrote on last edited by
      #4

      @Christian-Ehrlicher

      void wSpectrum::AddChartSeries(bool isData, usrTableModel* pModel)
      {
      	QLineSeries* pSeries = new QLineSeries(m_pChart);
      	//pSeries->setUseOpenGL(true);							// 속도 향상
      
      	QVXYModelMapper* mapper = new QVXYModelMapper(this);
      	mapper->setXColumn(0);
      	mapper->setYColumn(pModel->GetColCount()-1);
      	
      	if(isData)
      		mapper->setSeries(pSeries);
      
      	mapper->setModel(pModel);
      
      	m_pChart->addSeries(pSeries); 
      	m_pChart->createDefaultAxes();
      
      	// [축 재설정] 
      	{
      		QValueAxis* axisx = qobject_cast<QValueAxis*>(m_pChart->axes(Qt::Horizontal).first());
      		axisx->setTickCount(5);
      
      		m_pChart->axisX()->setTitleFont(cGlobalParam::gGetChartAxis(true));
      		m_pChart->axisX()->setTitleText("Wave Length");
      		m_pChart->axisX()->setTitleBrush(QBrush(QColor(76, 127, 185)));		
      
      		m_pChart->axisY()->setTitleFont(cGlobalParam::gGetChartAxis(true));
      		m_pChart->axisY()->setTitleText("Absorbance.");
      		m_pChart->axisY()->setTitleBrush(QBrush(QColor(76, 127, 185)));
      	}
      
      	// [행의 마지막 위치로 이동]
      	QModelIndex index = pModel->index(0, pModel->GetColCount()-1, QModelIndex());
      	this->ui.tableWidget->scrollTo(index, QAbstractItemView::PositionAtTop);
      }
      
      void wSpectrum::BtnMeasure()
      {
      	QPair<QString, QList<qreal>> pairTemp2;
      
          pairTemp2.first = QString("D_%1").arg(m_pDataModel->GetInputData().count());
      	for (int i = 0; i < this->m_pSpectrumInfo->GetDataCount()+1; i++)
      	{        
      		qreal qRan1 = QRandomGenerator::global()->bounded(0, 10);
      		qreal qRan2 = QRandomGenerator::global()->generateDouble();
      		pairTemp2.second.append(qRan1 + qRan2);
      	}
      	m_pDataModel->AppendData(pairTemp2);
      
          AddChartSeries(true, m_pDataModel);	
      	//this->update();
      }
      

      I am connecting tables and charts with Abstractmodel. It draws a series whenever data comes in, but the setUseOpenGL option seems to be the cause. Please understand that we cannot upload the full source.

      1 Reply Last reply
      0
      • Christian EhrlicherC Christian Ehrlicher

        Without a minimal, compilable example we can't say if it's a bug in Qt or on your side. I would guess it's on your side.

        I Offline
        I Offline
        IknowQT
        wrote on last edited by
        #5

        @Christian-Ehrlicher

        pSeries->setUseOpenGL(true); If I disable the function, it works fine.
        The problem with this is that even if you delete all the series in the chart, it remains on the screen. But when I switch to another screen with the mouse, it is cleared.

        This is a bug.

        1 Reply Last reply
        0
        • Christian EhrlicherC Offline
          Christian EhrlicherC Offline
          Christian Ehrlicher
          Lifetime Qt Champion
          wrote on last edited by
          #6

          If you can't provide a minimal, compilable example we can't help here. I doubt it's a bug in Qt but on your side. If you think it's a bug, write a bug report but even there you need a minimal, compilable examle to get your problem fixed...

          Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
          Visit the Qt Academy at https://academy.qt.io/catalog

          I 1 Reply Last reply
          0
          • Christian EhrlicherC Christian Ehrlicher

            If you can't provide a minimal, compilable example we can't help here. I doubt it's a bug in Qt but on your side. If you think it's a bug, write a bug report but even there you need a minimal, compilable examle to get your problem fixed...

            I Offline
            I Offline
            IknowQT
            wrote on last edited by IknowQT
            #7

            @Christian-Ehrlicher

            93a99d2a-0cf5-4047-b21a-ed9482b8bf86-image.png

            https://github.com/HaonPAPA/MyRepository/blob/main/linechart.7z

            I have created an example. A dialog box pops up after creating a series by clicking the Add series button.
            A blue widget is floating in the dialog. It is drawn over the widget.

            1 Reply Last reply
            1
            • Christian EhrlicherC Offline
              Christian EhrlicherC Offline
              Christian Ehrlicher
              Lifetime Qt Champion
              wrote on last edited by
              #8

              It's the combination of Qt::FramelessWindowHint and OpenGl. You should create a bug report with your testcase.

              Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
              Visit the Qt Academy at https://academy.qt.io/catalog

              I 1 Reply Last reply
              1
              • Christian EhrlicherC Christian Ehrlicher

                It's the combination of Qt::FramelessWindowHint and OpenGl. You should create a bug report with your testcase.

                I Offline
                I Offline
                IknowQT
                wrote on last edited by IknowQT
                #9

                @Christian-Ehrlicher

                Are you saying it's a bug?

                1 Reply Last reply
                0
                • Christian EhrlicherC Offline
                  Christian EhrlicherC Offline
                  Christian Ehrlicher
                  Lifetime Qt Champion
                  wrote on last edited by
                  #10

                  Yes - as I told you create a bug report, but why do you need such a dialog on top?

                  Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
                  Visit the Qt Academy at https://academy.qt.io/catalog

                  I 1 Reply Last reply
                  0
                  • Christian EhrlicherC Christian Ehrlicher

                    Yes - as I told you create a bug report, but why do you need such a dialog on top?

                    I Offline
                    I Offline
                    IknowQT
                    wrote on last edited by
                    #11

                    @Christian-Ehrlicher

                    I am trying to open an option window. However, as a form of style, I tried to lower the alpha value around it to draw more attention to the options window.

                    The method I have implemented may not be the normal method.
                    If there is a better way please suggest

                    1 Reply Last reply
                    0
                    • Christian EhrlicherC Offline
                      Christian EhrlicherC Offline
                      Christian Ehrlicher
                      Lifetime Qt Champion
                      wrote on last edited by
                      #12

                      What's wrong with a simple QDialog?

                      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
                      Visit the Qt Academy at https://academy.qt.io/catalog

                      I 1 Reply Last reply
                      0
                      • Christian EhrlicherC Christian Ehrlicher

                        What's wrong with a simple QDialog?

                        I Offline
                        I Offline
                        IknowQT
                        wrote on last edited by
                        #13

                        @Christian-Ehrlicher

                        60378480-35ba-4492-84c3-2ac9a7a32b4b-image.png
                        This is the UI I wanted.

                        1 Reply Last reply
                        0
                        • Christian EhrlicherC Offline
                          Christian EhrlicherC Offline
                          Christian Ehrlicher
                          Lifetime Qt Champion
                          wrote on last edited by
                          #14

                          This is a simple QMessageBox. Why so much work? Why must it be frameless?

                          Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
                          Visit the Qt Academy at https://academy.qt.io/catalog

                          I 1 Reply Last reply
                          0
                          • Christian EhrlicherC Christian Ehrlicher

                            This is a simple QMessageBox. Why so much work? Why must it be frameless?

                            I Offline
                            I Offline
                            IknowQT
                            wrote on last edited by
                            #15

                            @Christian-Ehrlicher

                            The program we are developing is user UI-oriented, so we have to pay a lot of attention to the little things.

                            answer my question
                            What I want is to blur the background behind it. It could be done very simply in C# too.
                            Is there a better way than the way I did?

                            1 Reply Last reply
                            0
                            • Christian EhrlicherC Offline
                              Christian EhrlicherC Offline
                              Christian Ehrlicher
                              Lifetime Qt Champion
                              wrote on last edited by
                              #16

                              I don't know - if you've a commercial license then ask TQtC to fix it. Otherwise find a workaround.

                              Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
                              Visit the Qt Academy at https://academy.qt.io/catalog

                              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