Results 1 to 5 of 5

Thread: QGraphicsView without scroll bar

  1. #1
    Join Date
    Jul 2007
    Posts
    90
    Thanks
    2
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default QGraphicsView without scroll bar

    Hi,
    I need to have QgraphicsView without any scrollbar.
    Is that possible?

    regards,
    ~Sanjay

  2. #2
    Join Date
    Jun 2007
    Location
    India
    Posts
    1,042
    Thanks
    8
    Thanked 133 Times in 128 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QGraphicsView without scroll bar

    Qt::ScrollBarAlwaysOff

  3. #3
    Join Date
    Jul 2007
    Posts
    90
    Thanks
    2
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QGraphicsView without scroll bar

    Yes i got it.

    by using setHorizontalScrollPolicy and setVerticalScrollPolicy we can achieve that.

  4. #4
    Join Date
    Jul 2007
    Posts
    90
    Thanks
    2
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QGraphicsView without scroll bar

    One more query regarding this.

    I am scaling the QGraphicsView, but scaling the view seems changing the items position.

    e.g if i have created the item and it is placed at top left corner of the view.
    then scaling the view should maintain the top left position of the items, but item should get scaled.


    How can it be done?


    Regards,
    ~Sanjay

  5. #5
    Join Date
    Sep 2008
    Location
    Bangalore
    Posts
    659
    Thanks
    116
    Thanked 42 Times in 41 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QGraphicsView without scroll bar

    are u reimplementing resizeEvent() .?
    "Behind every great fortune lies a crime" - Balzac

Similar Threads

  1. Replies: 1
    Last Post: 11th June 2009, 05:49
  2. Replies: 0
    Last Post: 5th March 2009, 06:54
  3. Is it possible to change the cursor on a QGraphicsView?
    By draftpunk in forum Qt Programming
    Replies: 2
    Last Post: 25th October 2008, 18:43
  4. QGraphicsView : scroll on drag
    By kghose in forum Qt Programming
    Replies: 4
    Last Post: 14th August 2008, 21:50
  5. QScrollArea's Scroll Bars
    By ToddAtWSU in forum Qt Programming
    Replies: 5
    Last Post: 19th September 2006, 13:27

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.