Results 1 to 5 of 5

Thread: Generating .bmp file

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Dec 2007
    Posts
    628
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows
    Thanks
    3
    Thanked 89 Times in 87 Posts

    Angry Re: Generating .bmp file

    Quote Originally Posted by aj2903 View Post
    Can some help me regarding QBitmap class.
    Is is possible to create new .bmp file using Qt. ?Can someone give me snippet of the code ?
    Try something like this.
    Qt Code:
    1. void paint_a_bitmap()
    2. {
    3. QPixmap bmp(500,500);
    4. QPainter p(&bmp);
    5. p.setPen(Qt::red);
    6. p.drawText(200,200,"Qt Painting");
    7. //DO SOME PAINTING HERE
    8. bmp.save("test.bmp");
    9. };
    To copy to clipboard, switch view to plain text mode 

  2. The following user says thank you to yogeshgokul for this useful post:

    aj2903 (12th November 2009)

Similar Threads

  1. Read binary from file
    By weldpua2008 in forum Newbie
    Replies: 2
    Last Post: 4th April 2009, 00:50
  2. Generating .pro files from vcproj file or CMake file
    By ramazangirgin in forum Qt Programming
    Replies: 2
    Last Post: 17th February 2009, 10:37
  3. Can you specify a file engine?
    By skimber in forum Qt Programming
    Replies: 2
    Last Post: 18th September 2008, 16:54
  4. Set up the Qt4.3.2 with Visual Studio 2005
    By lamoda in forum Installation and Deployment
    Replies: 6
    Last Post: 30th January 2008, 07:51
  5. qt-3.3.8 fail in scratchbox
    By nass in forum Installation and Deployment
    Replies: 0
    Last Post: 25th May 2007, 16:21

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.