Results 1 to 5 of 5

Thread: QGraphicsView and very small scale values

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2007
    Posts
    45
    Thanks
    5
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: QGraphicsView and very small scale values

    I've thought that limits of double (and float) datatypes are quite higher, on my system DBL_MIN=2.22507e-308, FLT_MIN=1.17549e-38. And in Qt4.2 it worked quite better.

    I can't just divide all values by fixed number since they are not known in advance. It seems that I have to forget about scale() method and use manual scaling.

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

    Default Re: QGraphicsView and very small scale values

    It's about the resolution, not the highest/lowest possible value. Floating point types can't represent each and every possible value between in its range.

    You don't have to know anything in advance, you can calculate the divisor dynamically.

  3. #3
    Join Date
    Jan 2007
    Posts
    45
    Thanks
    5
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: QGraphicsView and very small scale values

    You don't have to know anything in advance, you can calculate the divisor dynamically.
    I'm thinking about going this way. In essential this is manual scaling.

    Actually you can just take a look at my program: http://edu.kde.org/step. This screenshot was made with Qt4.2, with 4.3 it shows only several planets at the center.

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.