Results 1 to 6 of 6

Thread: QGraphicsLineItem - selection style

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    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: QGraphicsLineItem - selection style

    Well, you are using QGraphicsLIneItem, while in the Diagram scene example, they are using QGraphicsPolygonItem for arrows.

    Read the code for that example

  2. #2
    Join Date
    May 2008
    Location
    Rijeka, Croatia
    Posts
    85
    Thanks
    10
    Thanked 6 Times in 6 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QGraphicsLineItem - selection style

    Quote Originally Posted by aamer4yu View Post
    Well, you are using QGraphicsLIneItem, while in the Diagram scene example, they are using QGraphicsPolygonItem for arrows.

    Read the code for that example
    yes, but Arrow object consists from a line and arrow. It looks like arrow is just drawn in paint method. Arrow class inherits QGraphicsLIneItem
    Qt Code:
    1. class Arrow : public QGraphicsLineItem
    To copy to clipboard, switch view to plain text mode 
    why is selection different then in basic QGraphicsLIneItem?
    what am I missing?

  3. #3
    Join Date
    Jul 2008
    Posts
    27
    Thanks
    6
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QGraphicsLineItem - selection style

    In the diagram escen example they reimplement the boundingRect function .
    I think by default it draws the boundingRect with a dotted line .I have checked the QGraphicsLineItem::boundingrect function ,I dont know what does it do ,but ini some cases it returns that rectangle that is in the picture .
    If God has friends ,then I cant be God.

Similar Threads

  1. Mac Style for Qt Application---help needed
    By swamyonline in forum Qt Programming
    Replies: 3
    Last Post: 15th June 2008, 21:49

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.