Results 1 to 6 of 6

Thread: Setting the scene size in QGraphicsView

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,376
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Thanks
    4
    Thanked 5,019 Times in 4,795 Posts
    Wiki edits
    10

    Default Re: Setting the scene size in QGraphicsView

    When did you use it?

  2. #2
    Join Date
    Aug 2006
    Posts
    163
    Qt products
    Qt4
    Platforms
    Unix/X11
    Thanks
    12
    Thanked 5 Times in 4 Posts

    Default Re: Setting the scene size in QGraphicsView

    I was trying to set the size of the view loading the contents of the file to the parameters reported by teh file ( the DHW file format contains the width and height data of the file. Using setSceneRectangle() after loading the file wouldn't update the scene, at least not like I wanted it to. The text still originated at the top left corner, instead of updating so that the text moved slightly to the right and down. I tried various combinations of positive and negative offset values, nothing worked.

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

    Default Re: Setting the scene size in QGraphicsView

    You must have set the positions incorrectly. Hard to say withouth seeing the actual code...

Similar Threads

  1. QGraphicsView, QGraphicsItem, QGraphicsScene
    By Shuchi Agrawal in forum Newbie
    Replies: 10
    Last Post: 23rd March 2011, 21:50
  2. Size of QGraphicsView
    By IsleWitch in forum Newbie
    Replies: 10
    Last Post: 10th October 2007, 13:09
  3. setting needle size in qwtCompass
    By user in forum Qwt
    Replies: 4
    Last Post: 23rd July 2007, 00:40
  4. Replies: 3
    Last Post: 30th January 2007, 08:35
  5. How to use QGraphicsView and Scene right ...
    By Mike in forum Qt Programming
    Replies: 6
    Last Post: 22nd January 2007, 09:51

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.