Results 1 to 3 of 3

Thread: Implementing Qtoolbar or customized toolbar with qgraphicsitem.

  1. #1
    Join Date
    Apr 2010
    Posts
    6
    Qt products
    Qt4
    Platforms
    Windows

    Question Implementing Qtoolbar or customized toolbar with qgraphicsitem.

    How to implement movable toolbar on QGraphicsItem having some buttons on it and the bar should not be included in the boundingRect of item?

    The Toolbar should move with the Item in the view. The tool bar has to be placed at the bottom right of the item. example.png

  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: Implementing Qtoolbar or customized toolbar with qgraphicsitem.

    I don't get you 100%: should it be a tool bar for one item or for the whole scene? If the former: have a look at QGraphicsItemGroup (automatic moving of both items) as a starting point. But you have to take care about all things. There is less Qt can help you with.

    Also you can get ideas from the example about item handles as the are in various Qt books.

  3. #3
    Join Date
    Apr 2010
    Posts
    6
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Implementing Qtoolbar or customized toolbar with qgraphicsitem.

    Yes It has to be tool bar for one Item. Well u are saying my tool bar should also be a qgraphicsitem and i should group my item with this using QGraphicsItemGroup.It seems that it will work and i will get automatic movement.

    But there could be one more issue if more than one item is selected. Sorry I didn't mention that there could be more than one item. And my requirement is that :
    This toolbar will appear when a single ungrouped item is selected alone.

Similar Threads

  1. Replies: 5
    Last Post: 6th November 2012, 20:42
  2. Replies: 2
    Last Post: 10th February 2009, 13:12
  3. customized layout issue
    By sanjayshelke in forum Qt Programming
    Replies: 1
    Last Post: 28th November 2008, 07:02
  4. QStyleOptionProgressBar customized
    By xEsk in forum Qt Programming
    Replies: 1
    Last Post: 11th November 2007, 17:25
  5. Customized Table
    By tunguska in forum Qt Programming
    Replies: 3
    Last Post: 28th September 2007, 17:44

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.