Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. International
  3. Chinese
  4. QGraphicsView with openGL accleartion, resulting in map disappearing
Forum Updated to NodeBB v4.3 + New Features

QGraphicsView with openGL accleartion, resulting in map disappearing

Scheduled Pinned Locked Moved Unsolved Chinese
5 Posts 3 Posters 777 Views 1 Watching
  • 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.
  • A Offline
    A Offline
    AntibodyX
    wrote on last edited by
    #1

    0EB02DEC7DA08DBCD3ACF83D770C18A0.gif
    // 启用openGL加速
    _graphicsView=new GraphicsView(_scene);
    QOpenGLWidget *gl = new QOpenGLWidget();
    QSurfaceFormat format;
    format.setSamples(4);
    gl->setFormat(format);
    _graphicsView->setViewport(gl);

    上述使用QGraphicsView的过程中想使用openGL加速,但是出现加载了的地图放大之后逐渐稀释甚至消失的情况,这是为什么?如果注释掉_graphicsView->setViewport(gl);这一行代码,便不会出现问题,求解!!!!!!!!!!!

    jsulmJ 1 Reply Last reply
    0
    • A AntibodyX

      0EB02DEC7DA08DBCD3ACF83D770C18A0.gif
      // 启用openGL加速
      _graphicsView=new GraphicsView(_scene);
      QOpenGLWidget *gl = new QOpenGLWidget();
      QSurfaceFormat format;
      format.setSamples(4);
      gl->setFormat(format);
      _graphicsView->setViewport(gl);

      上述使用QGraphicsView的过程中想使用openGL加速,但是出现加载了的地图放大之后逐渐稀释甚至消失的情况,这是为什么?如果注释掉_graphicsView->setViewport(gl);这一行代码,便不会出现问题,求解!!!!!!!!!!!

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @AntibodyX said in QGraphicsView with openGL accleartion, resulting in map disappearing:

      上述使用QGraphicsView的过程中想使用openGL加速,但是出现加载了的地图放大之后逐渐稀释甚至消失的情况,这是为什么?如果注释掉_graphicsView->setViewport(gl);这一行代码,便不会出现问题,求解!!!!!!!!!!!

      Would be good if you would translate this to English

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      A 1 Reply Last reply
      0
      • SGaistS SGaist moved this topic from General and Desktop on
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #3

        Hi and welcome to devnet,

        This post has been moved to the Chinese sub-forum. Except in the international section, please use English for your queries.

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        A 1 Reply Last reply
        0
        • SGaistS SGaist

          Hi and welcome to devnet,

          This post has been moved to the Chinese sub-forum. Except in the international section, please use English for your queries.

          A Offline
          A Offline
          AntibodyX
          wrote on last edited by
          #4

          @SGaist understood

          1 Reply Last reply
          0
          • jsulmJ jsulm

            @AntibodyX said in QGraphicsView with openGL accleartion, resulting in map disappearing:

            上述使用QGraphicsView的过程中想使用openGL加速,但是出现加载了的地图放大之后逐渐稀释甚至消失的情况,这是为什么?如果注释掉_graphicsView->setViewport(gl);这一行代码,便不会出现问题,求解!!!!!!!!!!!

            Would be good if you would translate this to English

            A Offline
            A Offline
            AntibodyX
            wrote on last edited by
            #5

            @jsulm During the above process of using QGraphicsView, I wanted to use OpenGL to accelerate, but there was a situation where the loaded map gradually diluted or even disappeared after zooming in. Why is this? If commented out_ GraphicsView ->setViewport (gl); With this line of code, there will be no problem, solve the problem
            Thanks for replying !!!

            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