Results 1 to 7 of 7

Thread: graphics view FitInView problem

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Oct 2006
    Location
    New Delhi, India
    Posts
    2,467
    Thanks
    8
    Thanked 334 Times in 317 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Question graphics view FitInView problem

    I am submitting a scaled down code of my application which has the fit in view problem.

    In CMainWindow constructor, I am calling FitInView() so that the contents of the view are fit to the viewport at the initial display. But this thing doesnt work. I checked the zoom level before and after the scene->views().first()->fitInView(rect,Qt::KeepAspectRatio);. They work correctly when FIV button is pressed from the main window, but not when FitInView is called from the CMainWindow constructor.

    When I press the FIV button after the main window is displayed, the contents are properly fitted onto the viewport.

    Why doesnt FitInView work properly in the constructor of the main window ?? Is it a bug or am I mising something ??
    Attached Files Attached Files

Similar Threads

  1. Graphics View or Paint ?
    By igor in forum Qt Programming
    Replies: 4
    Last Post: 21st January 2007, 13:21
  2. which is better QCanvas or graphics view?
    By neomax in forum General Discussion
    Replies: 1
    Last Post: 23rd November 2006, 15:19
  3. Adding Rectangular overlay on graphics view
    By forrestfsu in forum Qt Programming
    Replies: 10
    Last Post: 21st November 2006, 19:42
  4. problem with tree view
    By boss_bhat in forum Newbie
    Replies: 4
    Last Post: 4th June 2006, 21:03
  5. View update problem
    By prakash in forum Qt Programming
    Replies: 6
    Last Post: 17th March 2006, 10:13

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.