I am looking to display heightmaps from the video game Battlefield 2 as images in my application.
I am new to C++ and Qt and it might be straight forward but what I am h
1. Basically what you need to do is to draw your pixels inside a widget.
So, firstly create an application which has a dialog, then draw on the dialog using the recommendations from:
Qt4 How to draw inside a widget?
And for the QPainter documentation: http://qt-project.org/doc/qt-4.8/QPainter.html
Notice, that you will need to create a QBrush while going through the pixels: http://doc.qt.nokia.com/4.7/qbrush.html
This will be pretty slow :(
2. Another more advanced solution would be to create a QImageReader and an associated Image IO plugin to read your format ( http://qt-project.org/doc/qt-4.8/qimagereader.html ) then create a QPixMap with the image reader ( http://qt-project.org/doc/qt-4.8/qpixmap.html#fromImageReader ) and create a QBrush with the given QPixmap and use it to draw :)