Results 1 to 2 of 2

Thread: Moving the (0.0) point on the scene

  1. #1
    Join Date
    May 2007
    Location
    Lublin, Poland
    Posts
    345
    Thanks
    40
    Thanked 8 Times in 4 Posts
    Qt products
    Qt3 Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Moving the (0.0) point on the scene

    Hi guys,

    The (0.0) point is located as the left upper corner of the scene. I would like to ask, is it possible to change the (0.0) point position, so it would be a point somewhere in the middle of the scene, and scene coordinates would be changing as the (0.0) point was there. I have a map and the (0,0) point is almost the center point of that map and status bar show the coordinates(x S/W , y N/E). Any idea how to achieve this?
    Thank you beforehand.

    Maverick
    Qt allows you to use everything you want
    wysota
    --------------------------------------------------------------------------------
    #if defined(Q_OS_UNIX) && defined(QT_DEBUG)
    abort(); // trap; generates core dump
    #else
    exit(1); // goodbye cruel world
    #endif

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

    Default Re: Moving the (0.0) point on the scene

    Of course.
    Qt Code:
    1. QGraphicsScene *sc = new QGraphicsScene(-100, -100, 200, 200);
    To copy to clipboard, switch view to plain text mode 

    This will give you a scene with coordinates ranging from -100 to +100 in both directions.

Similar Threads

  1. Creating a scene from piece of another scene
    By maverick_pol in forum Qt Programming
    Replies: 3
    Last Post: 23rd August 2007, 17:51
  2. How to use QGraphicsView and Scene right ...
    By Mike in forum Qt Programming
    Replies: 6
    Last Post: 22nd January 2007, 08: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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.