PDA

View Full Version : QPixmap Display RGB data



phoenixtju
27th May 2009, 09:55
HI, All
I am a new starter of Qt, I use qt QPixmap to display RGB data, the data are stored in memory, I can get the pointer that point to the data address. The data are changing, so the display need to be refresh. But my program can just display the first frame, how can I do to display dynamically?

Thanks

wysota
27th May 2009, 10:11
You have to convert a QImage to a QPixmap and set the new pixmap on the label or wherever you are displaying it. Things won't happen automatically - note that most of the relevant methods pass a copy of the pixmap.

faldzip
27th May 2009, 10:31
I don't know exactly what do you want and what are you doing know (pls describe your problem more clearly and maybe attach some code - if so, remember about [ CODE ] tags), but if you want to display a QPixmap then easy way is to set it to QLabel with QLabel::setPixmap() and than you can refresh it by callin update() on that label.