Results 1 to 6 of 6

Thread: What is the difference between QRect and QRectF?

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #2
    Join Date
    Sep 2009
    Location
    Wroclaw, Poland
    Posts
    1,394
    Thanked 342 Times in 324 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows Android

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

    What is the difference between QRect and QRectF ?
    Qt Code:
    1. The QRectF class defines a rectangle in the plane using floating point precision...
    2. ...
    3. The QRect class defines a rectangle in the plane using integer precision...
    To copy to clipboard, switch view to plain text mode 

    Qt Code:
    1. QRect rect(100.5,100.5,200.2,200.3);
    To copy to clipboard, switch view to plain text mode 
    Double values are implicitly converted to integers. You can find detailed info here: Type Conversions

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

    rezas1000 (10th 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.