Results 1 to 5 of 5

Thread: QGraphicsView (using int array) advice and display help

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Dec 2010
    Posts
    55
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default QGraphicsView (using int array) advice and display help

    I receive image data from an API as an int pointer to an array laid out in memory like a C array x[i][j][k]

    What would be the recommended way to display this image in a graphics view?
    I am currently using a nested loop to loop through the entire array and "QImage::setPixel(x,y,Qrgb)" to set every the color of every pixel. Then I turn the QImage into a Qpixmap, add it to a GraphicsScene, then link it to a GraphicsView.
    Last edited by enricong; 10th April 2012 at 03:45.
    Running:
    RHEL 5.4
    Python 2.7.2
    Qt 4.7.4
    SIP 4.7.8
    PyQt 4.7

Similar Threads

  1. Char array[6] to QString and display it
    By arunvv in forum Newbie
    Replies: 11
    Last Post: 12th March 2014, 20:48
  2. Display an image in a QGraphicsview
    By emilio in forum Newbie
    Replies: 8
    Last Post: 6th December 2011, 06:55
  3. General advice about scaling on QGraphicsView/QGraphicsScene
    By onurozcelik in forum Qt Programming
    Replies: 0
    Last Post: 24th May 2010, 08:14
  4. Display an image from a unsigned char array
    By Percy in forum Qt Programming
    Replies: 1
    Last Post: 1st December 2009, 20:16
  5. Display Images in QGraphicsView
    By robertaandrews in forum Qt Tools
    Replies: 4
    Last Post: 15th May 2007, 18:35

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
  •  
Qt is a trademark of The Qt Company.