Results 1 to 2 of 2

Thread: scroll area like QGraphicsItem

  1. #1
    Join Date
    Aug 2006
    Location
    Bangalore,India
    Posts
    419
    Thanks
    37
    Thanked 53 Times in 40 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default scroll area like QGraphicsItem

    hi,
    I am actually in need to implement an item to represent 2-d graphs and some more complicated graphs.
    As the graph can be pretty huge, it should be scrollable.
    My approach is to use a set of custom items and group to build the graph
    For eg scrollbars will be custom item.

    I am planning to use an approach something similar to QScrollArea but more simple. The ScrollAreaItem should host an item which represents the actual graph - say "canvas". Resizing the scrollarea should update the scrollbars, and also should indicate the visible area of canvas. The canvas in turn should use this hint to draw graph.

    is this feasible ? Will clipping result in very bad performance ?
    And btw i have to do this for qt 4.3 so can't use widgetitems. Also i can't use the lab's qgraphicswidget because it doesn't allow transformation.
    The biggest difference between time and space is that you can't reuse time.
    -- Merrick Furst

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

    Default Re: scroll area like QGraphicsItem

    I suggest you implement the item from scratch yourself and do the drawing using QStyle - you'll be able to handle the scrollbars without much effort then.

Similar Threads

  1. destruction of QGraphicsItem
    By killkolor in forum Qt Programming
    Replies: 2
    Last Post: 5th December 2009, 10:31
  2. abstract scroll area
    By moowy in forum Qt Programming
    Replies: 2
    Last Post: 2nd October 2006, 09:15
  3. QScrollArea's Scroll Bars
    By ToddAtWSU in forum Qt Programming
    Replies: 5
    Last Post: 19th September 2006, 13:27
  4. Problem with QScrollArea updating from 4.0.1 to 4.1.0
    By SkripT in forum Qt Programming
    Replies: 8
    Last Post: 28th January 2006, 22:35
  5. QRubberBand painting in the scroll area widget
    By SkripT in forum Qt Programming
    Replies: 7
    Last Post: 17th January 2006, 16:48

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.