Results 1 to 2 of 2

Thread: ScrollArea for Graphics Item

  1. #1
    Join Date
    Feb 2013
    Location
    India
    Posts
    153
    Thanks
    27
    Thanked 18 Times in 18 Posts
    Qt products
    Qt4 Qt5 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default ScrollArea for Graphics Item

    Hello Everybody,

    I am working on a project which need to show 5-10 graphics items just like stack... means each item will be displayed at the bottom of other item.

    And this bunch of items need to be grouped together in a scroll area...

    i am stuck somewhere to ass a scroll area in the QGraphicsScene and this scroll area contains QGraphicsItems...


    like
    Qt Code:
    1. // SCENE ->
    2. +--------------------------------------------------------------------------------------+
    3. | | ITEM | |
    4. | | ITEM | |
    5. | | ITEM | |
    6. +--------------------------------------------------------------------------------------+
    7. | | SCROLL AREA | |
    8. | | | |
    9. | +----------------------------------------------------------------------------------+ | |
    10. | | | | |
    11. | | ITEM | | |
    12. | | | | |
    13. | | | | |
    14. | +----------------------------------------------------------------------------------+ | |
    15. | | | |
    16. | +----------------------------------------------------------------------------------+ | |
    17. | | | | |
    18. | | | | |
    19. | | ITEM | | | < - Scroll Bar
    20. | | | | |
    21. | | | | |
    22. | +----------------------------------------------------------------------------------+ | |
    23. | | | |
    24. | +----------------------------------------------------------------------------------+ | |
    25. | | | | |
    26. | | | | |
    27. | | ITEM | | |
    28. | | | | |
    29. | +----------------------------------------------------------------------------------+ | |
    30. +--------------------------------------------------------------------------------------+
    To copy to clipboard, switch view to plain text mode 

  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: ScrollArea for Graphics Item

    It will be simple to use QGraphicsWidget or QGraphicsProxyWidget, you will need to make your items as widgets.
    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.

  3. The following user says thank you to Santosh Reddy for this useful post:

    karankumar1609 (12th July 2013)

Similar Threads

  1. coordinate transformation of graphics item
    By sajis997 in forum Qt Programming
    Replies: 1
    Last Post: 14th February 2012, 10:19
  2. Graphics item highlight
    By mukunda in forum Qt Programming
    Replies: 1
    Last Post: 8th April 2011, 19:21
  3. Graphics Item
    By Maluko_Da_Tola in forum Newbie
    Replies: 4
    Last Post: 20th July 2010, 15:37
  4. Serialization and graphics item
    By prashant in forum Qt Programming
    Replies: 1
    Last Post: 12th November 2009, 12:03
  5. Graphics item position after drag
    By Miihkali in forum Qt Programming
    Replies: 3
    Last Post: 17th March 2009, 11:01

Tags for this Thread

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.