Results 1 to 2 of 2

Thread: Drawing in GraphicsView

  1. #1
    Join Date
    Apr 2010
    Posts
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Drawing in GraphicsView

    Hi ,
    I am new to GraphicsView Programming, I want to draw a line with mouse move while its left mouse
    button pressed as in paint brush application . After drawing the line we sould be able to move the line
    from one pos. to another pos. with the help of mouse move while it's left mouse button pressed on the line .
    Please give the simple example code so that i can better understand the logic behind it and can modify according
    to my needs .

    Thanx in advance .

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,373
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Thanks
    3
    Thanked 5,019 Times in 4,795 Posts
    Wiki edits
    10

    Default Re: Drawing in GraphicsView

    I suggest you first try something yourself and only then should you fail, come here, show us your code and we will help you correct it. There is a lot of example code bundled with Qt, you will surely find something to base your code on. Right now I can only advise to take a closer look at QGraphicsLineItem,QGraphicsScene::mousePressEvent() and QGraphicsScene::mouseReleaseEvent().
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. windowIcon in GraphicsView
    By gogodream in forum Qt Programming
    Replies: 3
    Last Post: 8th February 2010, 02:11
  2. Move graphicsView
    By jano_alex_es in forum Newbie
    Replies: 5
    Last Post: 20th November 2009, 16:25
  3. Scribble to GraphicsView
    By rdelgado in forum Qt Programming
    Replies: 3
    Last Post: 11th November 2009, 15:52
  4. Graphicsview??
    By Screeze in forum Newbie
    Replies: 2
    Last Post: 5th July 2009, 17:01
  5. QT GraphicsView Help
    By mistertoony in forum Qt Programming
    Replies: 15
    Last Post: 15th February 2007, 04:17

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.