Results 1 to 5 of 5

Thread: Graphics View or Paint ?

  1. #1
    Join Date
    Jan 2007
    Posts
    30
    Thanks
    1
    Thanked 1 Time in 1 Post
    Qt products
    Qt4 Qt5 PyQt3 PyQt4
    Platforms
    MacOS X

    Talking Graphics View or Paint ?

    I am writing an application to create line graphics with text for multi-page output to a graphic file (png/jpg) or pdf.

    Two questions:

    1. Should I do each page as a separate graphic/image ?
    2. What are the advantages/disadvantages of using either the GraphicsView system or Paint system to do this ?

    Thanks.

  2. #2
    Join Date
    Jan 2006
    Location
    Cambridge, MA
    Posts
    32
    Thanked 7 Times in 6 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Graphics View or Paint ?

    You want to use QPainter. QGraphicsView is a spritefield of 2D objects. Not a gerneral purpose drawing system.

    --Justin

  3. #3
    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: Graphics View or Paint ?

    Quote Originally Posted by Glitch View Post
    You want to use QPainter. QGraphicsView is a spritefield of 2D objects. Not a gerneral purpose drawing system.

    It depends what he intends to do with the graphics. If he wants to start moving objects around or changing their properties, then the graphicsview might get handy.

  4. #4
    Join Date
    Jan 2007
    Posts
    30
    Thanks
    1
    Thanked 1 Time in 1 Post
    Qt products
    Qt4 Qt5 PyQt3 PyQt4
    Platforms
    MacOS X

    Default Re: Graphics View or Paint ?

    Quote Originally Posted by wysota View Post
    It depends what he intends to do with the graphics. If he wants to start moving objects around or changing their properties, then the graphicsview might get handy.
    The graphics are going to be static. Adjusting input parameters in another portion of the window will cause a complete redraw.

    Sounds like "Paint" is the way to go.

    However, what widget do I "paint" on ? That is not clear in Qt 4

  5. #5
    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: Graphics View or Paint ?

    QWidget?

Similar Threads

  1. which is better QCanvas or graphics view?
    By neomax in forum General Discussion
    Replies: 1
    Last Post: 23rd November 2006, 15:19
  2. Adding Rectangular overlay on graphics view
    By forrestfsu in forum Qt Programming
    Replies: 10
    Last Post: 21st November 2006, 19:42
  3. Model, View and Proxy
    By No-Nonsense in forum Qt Programming
    Replies: 2
    Last Post: 21st November 2006, 08:50
  4. Automatic scroll in graphics view
    By Morea in forum Qt Programming
    Replies: 1
    Last Post: 18th November 2006, 14:07
  5. Replies: 6
    Last Post: 20th April 2006, 10:23

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.