Results 1 to 2 of 2

Thread: how to check QGrapicsView/QGraphicsScene size

  1. #1
    Join Date
    Jun 2009
    Posts
    25
    Thanks
    1

    Default how to check QGrapicsView/QGraphicsScene size

    hello
    I want to write something independent from device screen size. I want set position of icons on QGraphicsScene. I have to know the scene size in order to all icons set on the device screen (without scrollbar). Unfortunately I have no idea how to do it. Could you help me?

  2. #2
    Join Date
    Jun 2009
    Posts
    25
    Thanks
    1

    Default Re: how to check QGrapicsView/QGraphicsScene size

    If anyone have the same problem, here is solution:
    Qt Code:
    1.  
    2. QGraphicsView view(&scene);
    3. view.show();
    4.  
    5. QRectF geometry = view.contentsRect();
    To copy to clipboard, switch view to plain text mode 
    Last edited by estel; 9th February 2010 at 23:50.

Similar Threads

  1. Replies: 12
    Last Post: 30th May 2009, 14:29
  2. Replies: 2
    Last Post: 23rd March 2009, 17:26
  3. How can we check the size of a pointer?
    By learning_qt in forum Qt Programming
    Replies: 3
    Last Post: 13th January 2009, 04:58
  4. QGraphicsScene size
    By invictus in forum Qt Programming
    Replies: 11
    Last Post: 12th August 2007, 21:26
  5. How can I make size of QGraphicsScene smaller?
    By troorl_ua in forum Qt Programming
    Replies: 6
    Last Post: 21st April 2007, 07:56

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.