April 6, 2012

JothiMurugeswaran JothiMuruges..
Lab Rat
23 posts

How to get the actual width of the QGraphicsScene

 

Hi,

I want to find out the width of the QGraphicsScene object. I have used Width, sceneRect. But it is not giving the expected result.

Example: Created a QGraphicsScene with a width of 500. And draw a line ranging from 10 to 1010 in x axis. Now if i used the width function, it is return 500 and not 1010. What is the method to get the actual width (Extended width made by diagram). ie. 1010.

1 reply

April 6, 2012

JothiMurugeswaran JothiMuruges..
Lab Rat
23 posts

Hi, I got the answer, it is through itemsBoundingRect

 
  ‹‹ How to change the font size in the QTextEdit from the QComboBox      QDockWidget and QML ››

You must log in to post a reply. Not a member yet? Register here!