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. RenderPixmap not behaving the same between QT 4.8 and QT 5.1
Qt 6.11 is out! See what's new in the release blog

RenderPixmap not behaving the same between QT 4.8 and QT 5.1

Scheduled Pinned Locked Moved General and Desktop
5 Posts 2 Posters 2.3k 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.
  • C Offline
    C Offline
    cafun
    wrote on last edited by
    #1

    Hello,

    I am in the process of porting my application from QT 4.8 to QT 5.1. This is an openGL application that uses an inherited QGLWidget class similar to the hellogl example provided with the 5.1 distribution.

    See: qtbase/examples/opengl/hellogl

    I have a distribution of this application on several platforms but for right now I am working with the Linux platform openSUSE 12.3.

    My application uses the renderPixmap utility provided with the QGLWidget to generate a QPixmap of the current openGL scene.

    The problem I am having is that the renderPixmap routine is returning an empty image under QT 5.1 and not in QT 4.8

    To test this out I have changed the following routine in the hellogl example

    void Window::keyPressEvent(QKeyEvent *e)
    {
    if (e->key() == Qt::Key_Escape)
    close();
    else
    QWidget::keyPressEvent(e);

    QPixmap glpixmap = glWidget->renderPixmap (100, 100,false );
    
     std::cerr<<"KeyEvent Width "<<glpixmap.width()<<" height "<<glpixmap.height()<<" depth "<<glpixmap.depth()<<" "<<std::endl;
    

    }

    When this example is compiled the height width and depth of the pixmap are zero.

    Interestingly if I do the same thing with the hellogl example provided with QT 4.8 the pixmap is not empty.

    Could someone offer a suggestion as to why this is happening?

    Thanks,

    Jeff

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      This sounds like a regression. Did you check whether the is something related in the "bug report system":http://bugreports.qt-project.org/issues ?

      As a side note, please enclose your code in coding tags, it will make it readable.

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

      1 Reply Last reply
      0
      • C Offline
        C Offline
        cafun
        wrote on last edited by
        #3

        Thanks for the reply.

        Did not know how to use the code tags sorry.

        I did a quick check on the bug report system and did not see anything related to this. I will report this problem there.

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Don't forget to post the link to the bug report here so other may also benefit from it :)

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

          1 Reply Last reply
          0
          • C Offline
            C Offline
            cafun
            wrote on last edited by
            #5

            Here is the link

            "Link to the bug report I filed":http://bugreports.qt-project.org/browse/QTBUG-33186

            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