Results 1 to 4 of 4

Thread: paint solution

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Sep 2010
    Posts
    1
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Windows

    Question paint solution

    Can any one give me an advice how to build a program that will act like Microsoft Paint program. Like i will take value from mouse event and it will draw on a widget or other painting device. I can draw on a widget but when i repaint it it clears all previous drawing .What will be the benefit of using Qgraphicsview or item i also need to zoom it and give a X axis scale and Y axis scale view for help drawing.

    This is urgent if anyone has any suggestion please tell me.
    or give me some basic Code.

  2. #2
    Join Date
    Jan 2006
    Location
    Belgium
    Posts
    1,938
    Thanked 268 Times in 268 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Wiki edits
    20

  3. #3
    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: paint solution

    I can draw on a widget but when i repaint it it clears all previous drawing
    Can you elaborate ?

    There can be solutions to store what you are drawing..

  4. #4
    Join Date
    Jan 2006
    Location
    Alingsås, Sweden
    Posts
    437
    Thanks
    3
    Thanked 39 Times in 39 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: paint solution

    Use a QImage on which you do the actual painting. That image can then be saved. Update the actual view (i.e. your widget) from the image.

    Using the graphics view framework for a pixel based paint application is just wrong. That would be applicable is the question was how to build a vector drawing application.

Similar Threads

  1. Replies: 6
    Last Post: 10th May 2010, 16:27
  2. QT Resolution solution : Need suggestion
    By soumyadeep_pan in forum Qt Programming
    Replies: 5
    Last Post: 25th March 2009, 10:05
  3. Fast Clipping [SOLUTION]
    By maverick_pol in forum Qt Programming
    Replies: 14
    Last Post: 24th October 2008, 12:30
  4. clean solution?
    By Dumbledore in forum Qt Programming
    Replies: 5
    Last Post: 30th October 2007, 00:44
  5. Problem and solution about QSA 1.2.0 compilation
    By Dwarf007 in forum Installation and Deployment
    Replies: 5
    Last Post: 7th March 2006, 16:52

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.