jpegs with qt and ruby

S

StillLifeWood

Hi, does anyone have a simple example of putting a jpeg image on a form
using QImage in Qt.

thanks in advance

David
 
R

Richard Dale

Hi, does anyone have a simple example of putting a jpeg image on a form
using QImage in Qt.
I think you'd use Qt::pixmap/QPixmap and a Qt::Label for that, rather than
Qt::Image, eg:

blankPM = Qt::pixmap.new("rbtestimage.jpeg")
pmLbl = Qt::Label.new("", nil)
pmLbl.pixmap = blankPM

Qt::Images are for when you actually want to manipulate the image, and
Qt::pixmaps are for displaying them.

-- Richard
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,166
Messages
2,570,902
Members
47,442
Latest member
KevinLocki

Latest Threads

Top