Results 1 to 2 of 2

Thread: prob on setpixel in Qimage ?

  1. #1
    Join Date
    Sep 2009
    Posts
    54
    Thanks
    4
    Thanked 3 Times in 3 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default prob on setpixel in Qimage ?

    Dear Friends,
    I m trying to draw on Qimage during run time by using setPixel() but i con't set the pixel..... program running successfully setPixel() function also executed but the pixel value is not changing. the code is ....

    Qt Code:
    1. QImage *theImage = new QImage;
    2. theImage.setPixel(x1 , y1,0x000000);
    To copy to clipboard, switch view to plain text mode 

    Thanks,

    Regards,
    Askar

  2. #2
    Join Date
    Oct 2006
    Location
    New Delhi, India
    Posts
    2,467
    Thanks
    8
    Thanked 334 Times in 317 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: prob on setpixel in Qimage ?

    Is that the code ?
    If yes, it wont work because you didnt mention size.
    Try QImage *image = new QImage(600,400,QImage::Format_ARGB32);

Similar Threads

  1. QImage setPixel does not set alpha value
    By sanjayshelke in forum Qt Programming
    Replies: 7
    Last Post: 20th February 2009, 10:15
  2. [SOLVED] QImage setPixel alpha issue
    By bunjee in forum Qt Programming
    Replies: 1
    Last Post: 19th September 2008, 15:06
  3. OGLWidget + setPixel = slow
    By JimJey in forum Qt Programming
    Replies: 1
    Last Post: 9th April 2008, 20:08
  4. problem with setPixel
    By sar_van81 in forum Qt Programming
    Replies: 6
    Last Post: 2nd February 2007, 10:16
  5. prob on connect
    By mickey in forum Newbie
    Replies: 3
    Last Post: 4th July 2006, 07:28

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.