Results 1 to 6 of 6

Thread: What is the difference between QRect and QRectF?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,319
    Thanks
    316
    Thanked 870 Times in 857 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: What is the difference between QRect and QRectF?

    why the QRect and the QRectF were built? please explain,thank you.
    With Qt 4, the coordinate system used in painting was changed from integer-based (pixels) to floating point (world coordinates). This permitted scaling and other transformations to be specified and performed more precisely, without rounding errors. In order to not break all existing code, a new set of floating point coordinate classes (QRectF, QSizeF, QPointF, etc.) was introduced side-by-side with the integer versions, and painting operations were extended to use the new floating point classes without changing the pre-existing integer methods.

  2. The following user says thank you to d_stranz for this useful post:

    rezas1000 (11th September 2014)

Similar Threads

  1. Implementation differences between QRect and QRectF
    By wayfaerer in forum Qt Programming
    Replies: 1
    Last Post: 30th December 2012, 10:59
  2. Resize QRectF in drawText when necessary
    By estanisgeyer in forum Qt Programming
    Replies: 0
    Last Post: 21st February 2010, 14:27
  3. difference of QRect and QRectF
    By gbmtoday in forum Newbie
    Replies: 1
    Last Post: 14th January 2010, 22:52
  4. Rotate a QRectF
    By whitefurrows in forum Qt Programming
    Replies: 5
    Last Post: 15th July 2009, 15:33
  5. QRectF and drawText
    By aronsson in forum Qt Programming
    Replies: 1
    Last Post: 4th July 2006, 16:05

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.