Results 1 to 2 of 2

Thread: QT's Scribble example

  1. #1
    Join Date
    Mar 2013
    Posts
    43
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default QT's Scribble example

    Hi,

    I am using QT Scribble example. When we draw using mouse, there is slightly zigzag kind of structure. I want it to be like solidline when i use this. Please help me.

    Rgds,
    Mythili

  2. #2
    Join Date
    Mar 2011
    Location
    Hyderabad, India
    Posts
    1,882
    Thanks
    3
    Thanked 452 Times in 435 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows
    Wiki edits
    15

    Default Re: QT's Scribble example

    Then Qt Scribble is not the example for drawing line, you better have a look at Diagram Scene Example

    Any way just to answer your post, comment the code in mouseMoveEvent(), and see what happens
    Qt Code:
    1. void ScribbleArea::mouseMoveEvent(QMouseEvent *event)
    2. {
    3. // if ((event->buttons() & Qt::LeftButton) && scribbling)
    4. // drawLineTo(event->pos());
    5. }
    To copy to clipboard, switch view to plain text mode 
    When you know how to do it then you may do it wrong.
    When you don't know how to do it then it is not that you may do it wrong but you may not do it right.

Similar Threads

  1. Replies: 1
    Last Post: 19th November 2010, 17:41
  2. Scribble to GraphicsView
    By rdelgado in forum Qt Programming
    Replies: 3
    Last Post: 11th November 2009, 15:52
  3. Scribble example: problem with mouse pointer
    By srinath1986 in forum Qt for Embedded and Mobile
    Replies: 0
    Last Post: 24th February 2008, 13:13
  4. Memory question - scribble example program
    By Franco9 in forum Qt Programming
    Replies: 1
    Last Post: 17th October 2006, 03:18

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.