Results 1 to 2 of 2

Thread: Problem with Graphics View Framework

  1. #1
    Join Date
    May 2009
    Qt products
    MacOS X Unix/X11

    Default Problem with Graphics View Framework


    I have to visualize a map of the Netherlands. I have the latitude and longitude of many points and convert them to x/y-coordinates via the Mercator projection.
    Now my x/y-coordinates lie between, say 60.001 and 60.0015. That's quite a small interval. Now I thought that I could just add all the points to the scene and then tell Qt to scale the view such that the leftmost point lies on the left edge of the view and the rightmost point lies on the right edge.

    How would I do that? I'm very confused about the transformations between the scene and the view. Is there a best practice? I don't want to reinvent the wheel.

    Help would be very appreciated, as I should get something done by tomorrow …

  2. #2
    Join Date
    Jan 2006
    Warsaw, Poland
    Thanked 5,013 Times in 4,791 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits

    Default Re: Problem with Graphics View Framework

    Set the scene rect to (1, 1, 1500, 1500) so that each unit represents 0.000001.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.

Similar Threads

  1. QWidget or Graphics view Framework in SCADA
    By SamSong in forum Qt Programming
    Replies: 3
    Last Post: 29th May 2018, 11:57
  2. Issues with the Graphics View Framework
    By lni in forum Qt Programming
    Replies: 8
    Last Post: 26th April 2009, 15:13
  3. graphics view FitInView problem
    By aamer4yu in forum Qt Programming
    Replies: 6
    Last Post: 25th January 2007, 11:24
  4. Adding Rectangular overlay on graphics view
    By forrestfsu in forum Qt Programming
    Replies: 10
    Last Post: 21st November 2006, 20:42
  5. View update problem
    By prakash in forum Qt Programming
    Replies: 6
    Last Post: 17th March 2006, 11:13


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.