Results 1 to 20 of 21

Thread: Reading scenePos by small step

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #11
    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 Re: Reading scenePos by small step

    I belive that the code is not a problem, rather the understanding of coordinates system.
    I am passing from signal to slot the:
    Qt Code:
    1. mouseEvent->scenePos();
    To copy to clipboard, switch view to plain text mode 
    scenePos().x() in the qDebug() show the int, so I belive that I am reading only int values, but need to also read the decimal fraction.

    How to do it is the problem.


    But...when I zoom, let's say 3 times, I get high precision coordinates.(because the distance between 2 point is bigger, and this maybe be the reason).
    Last edited by maverick_pol; 17th August 2007 at 13:30.
    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

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.