Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-114146

missing QSizeF::toAlignedSize() as analogy to QRectF::toAlignedRect()

XMLWordPrintable

    • Icon: Suggestion Suggestion
    • Resolution: Unresolved
    • Icon: P3: Somewhat important P3: Somewhat important
    • None
    • 6.5.0
    • Core: Other
    • None
    • All

      QRectF has a very useful function toAlignedRect() which basically rounds-up the rectangle to produce integer QRect.

      I would find very useful and intuitive to have similar function for QSizeF, i.e. toAlignedSize() which would return rounded-up integer QSize.

      Without this, one must manually write QSize(ceil(sizeF.width()), ceil(sizeF.height())).

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            Unassigned Unassigned
            vladimir.kraus Vladimir Kraus
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes