Results 1 to 3 of 3

Thread: QPixmap Display RGB data

  1. #1
    Join Date
    May 2009
    Posts
    1
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Windows

    Question QPixmap Display RGB data

    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

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QPixmap Display RGB data

    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.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. #3
    Join Date
    Jan 2008
    Location
    Poland
    Posts
    687
    Thanks
    4
    Thanked 140 Times in 132 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: QPixmap Display RGB data

    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.
    I would like to be a "Guru"

    Useful hints (try them before asking):
    1. Use Qt Assistant
    2. Search the forum

    If you haven't found solution yet then create new topic with smart question.

Similar Threads

  1. real time data display
    By hammer256 in forum Qt Programming
    Replies: 13
    Last Post: 25th March 2013, 16:47
  2. Best way to display lots of data fast
    By New2QT in forum Newbie
    Replies: 4
    Last Post: 16th October 2008, 22:46
  3. Replies: 2
    Last Post: 29th September 2008, 00:08
  4. Loading a QPixmap from raw data
    By pherthyl in forum Qt Programming
    Replies: 1
    Last Post: 27th January 2008, 10:12
  5. First attempt to display serial port data on GUI
    By ShaChris23 in forum Newbie
    Replies: 12
    Last Post: 4th May 2007, 09:14

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.