PDA

View Full Version : QPixmap/QImage serious issues between Windows/Unix



Largo
17th November 2011, 13:45
Good day to you all around,

I am writing a program which computes data and presents this data to the user. I am developing this program with Virtual Studio 10, but I also want to run the application on a Unix system. The problems I am experiencing are very frustrating. I hope you can help me on this.

General architecture:
Data ia read and processed in one thread, every computed frame of data is packed in a list as a QImage and a signal is fired up. The images are very big.
When the signal is fetched, the QImage is transformed into a QPixmap and added to a QGraphicsScene. The user can see the scene through a QGraphicsView. I am experiencing some serious instability (an exception is thrown) when I close the application with the [x], but not when I close it with a specially tailored [Quit] button. Ideas on that? Bad architecture?

The situation on Windows:
The graphics are fast, but are not very nice. I found some nice flags I want to try out (QPainter, setRenderHints,..) but I haven't found the entry point for that. Anyway, in general: Windows works and is fast. Rest is cosmetics.

The same code on Unix:
Slow as hell. I read on the forums and on the QtLabs blog that this may come from the conversion between QImage and QPixmap. With Raster as the graphicssystem I see the incoming data rather fast, but painting on the scene is still hellish slow. Also, while the application produces grayscale images, on Unix everything is rainbow colored. I am not sure, but is it possible that Qt interprets my 8-Bit grayscales as RGB? I have set the flag for the format (8Bit Indexed). Priority target: Getting the image in grayscale without much overhead.
Another issue: After some blocks of data a single white line is inserted. This only occurs under unix. And I have no clue why.

Any help or direction advise would be helpful. Thanks in advance!

edit: oh, its all in C/C++.

Largo
22nd November 2011, 13:22
Okay, I fixed the error when closing the application by myself, but I am still experiencing the errors on the Unix environment. Any tips on that topic?