Results 1 to 6 of 6

Thread: Canvas in QT

  1. #1
    Join Date
    Mar 2010
    Posts
    69
    Thanks
    8
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default Canvas in QT

    Hi Everyone,
    I am new in QT so can you please tell me how can I add two Canvas in my QFrame?
    Thanks.

  2. #2
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: Canvas in QT

    what exactly you mean by Canvas? You can draw on every QWidget. To position two widget in a frame use layouts.

  3. #3
    Join Date
    Mar 2010
    Posts
    69
    Thanks
    8
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Canvas in QT

    I want to add two canvas where I can draw depending on the event I will receive from the user.

  4. #4
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: Canvas in QT

    Quote Originally Posted by chandan View Post
    I want to add two canvas where I can draw depending on the event I will receive from the user.
    Ok, then you have two main options: Subclass a QWidget and paint in its paint event to draw via QPainter. Or use a (more complex and powerfull) QGraphicsView framework.

    For arranging them in a frame use as told QLayout/QHBoxLayout...

  5. The following user says thank you to Lykurg for this useful post:

    chandan (11th March 2010)

  6. #5
    Join Date
    Mar 2010
    Posts
    69
    Thanks
    8
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Canvas in QT

    Thanks a lot.

  7. #6
    Join Date
    Apr 2011
    Posts
    4
    Qt products
    Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Canvas in QT

    Quote Originally Posted by chandan View Post
    I want to add two canvas where I can draw depending on the event I will receive from the user.
    have you done this already?

Similar Threads

  1. Replies: 1
    Last Post: 23rd February 2010, 07:25
  2. Problem with canvas()->update()
    By jblovloss in forum Qwt
    Replies: 1
    Last Post: 25th August 2009, 14:28
  3. problem with ported canvas example
    By bajarangi in forum Newbie
    Replies: 2
    Last Post: 29th July 2009, 22:30
  4. how to save canvas
    By doss in forum Newbie
    Replies: 1
    Last Post: 18th April 2009, 22:15
  5. Canvas problems
    By Tommytrojan in forum Qt Programming
    Replies: 22
    Last Post: 9th May 2006, 16:46

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.