Results 1 to 5 of 5

Thread: qt5.10 windowsXp strange conflict in displaying rendered Qpixmap in a graphicsView

  1. #1
    Join Date
    Jul 2011
    Posts
    15
    Thanks
    2
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default qt5.10 windowsXp strange conflict in displaying rendered Qpixmap in a graphicsView

    Hi I'm porting an application from Qt4.8 to 5.10. The application worked well in linux, mac and windows using 4.8.
    When I ported it to 5.10 it worked well in linux but in windows only works in some computers (still didn't tried Mac).
    The application runs, no error is reported but I cannot see the pixmap image in a graphicsview window.
    there a piece of code:
    Qt Code:
    1. scene.clear();
    2.  
    3. QPixmap *renderer = new QPixmap(tempfile.fileName().toLatin1().constData());
    4.  
    5. scene.clear();
    6. scene.addPixmap(*renderer);
    7. this->ui->graphicsView->setScene(&scene);
    To copy to clipboard, switch view to plain text mode 

    I attach two screenshots of exactly the same application in two different windows computers (same binary and same dll's)
    qtwin1.pngqtwin2.png

    I imagine that there should be any kind of conflict with the windows libraries but have no clue of what it may be and how to get around it.
    any hints will be much appreciated.

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: qt5.10 windowsXp strange conflict in displaying rendered Qpixmap in a graphicsVi

    Are you using the ANGLE or OpenGL-based Qt build on XP? ANGLE is known to have issues on XP.
    http://qt-project.org/wiki/Qt-5-on-W...GLE-and-OpenGL

  3. #3
    Join Date
    Jul 2011
    Posts
    15
    Thanks
    2
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: qt5.10 windowsXp strange conflict in displaying rendered Qpixmap in a graphicsVi

    I'm using openGl

  4. #4
    Join Date
    Jul 2011
    Posts
    15
    Thanks
    2
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: qt5.10 windowsXp strange conflict in displaying rendered Qpixmap in a graphicsVi

    I still haven't a clue what is going on but I can confirm that the problem is in fact with the rendering of the pixmap on the scene as the program works when i comment the addPixmap and add a simple test instead
    Qt Code:
    1. //scene.addPixmap(*renderer);
    2. scene.addText("Hello, world!");
    To copy to clipboard, switch view to plain text mode 

  5. #5
    Join Date
    Jul 2011
    Posts
    15
    Thanks
    2
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: qt5.10 windowsXp strange conflict in displaying rendered Qpixmap in a graphicsVi

    It seems that the problem is not in rendering a pixmap but with the QTemporaryFile Class that I use to build my png file. Most likely this class has problems with the mingw+qt5.1+some windows. I'll try to research further.


    *************************************

    I've found the problem. It is not qt fault, neither mingw or windows it is really my fault. For reasons I do not already remember I was using
    tempfile.fileName().toLatin1().constData() instead of just tempfile.fileName() and when the windows user have characters with accents the path of the temporary file became somehow inaccessible. In 4.8 I had the .toAscii() instead of toLatin1() and everything worked fine.
    Last edited by artome; 17th July 2013 at 19:10.

Similar Threads

  1. Replies: 4
    Last Post: 26th September 2011, 22:55
  2. Problem displaying a QPixmap
    By franco.amato in forum Qt Programming
    Replies: 27
    Last Post: 28th September 2010, 22:40
  3. Problem with displaying a QPixmap on a QImage
    By moatilliatta in forum Newbie
    Replies: 3
    Last Post: 7th September 2010, 17:30
  4. MinGW conflict?
    By Paolo_R in forum Newbie
    Replies: 3
    Last Post: 30th June 2009, 05:16
  5. Framebuffer conflict
    By Vidar Bøe in forum Qt for Embedded and Mobile
    Replies: 0
    Last Post: 21st November 2008, 10:33

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.