Pages
API Documentation
On this page

AlignedSize QML Type

An attached property that aligns a size on the physical pixel grid. This type was introduced in Qt 6.20. More...

  • Import Statement: import org.kde.kirigami.primitives
  • Since: Qt 6.20

Detailed Description

Adjusts a size to the nearest one perfectly aligned to the pixel grid in case fractional scaling in used.

import org.kde.kirigami as Kirigami

Rectangle {
   AlignedSize.width: Units.gridUnit
   AlignedSize.height: 1
}

Attached Property Documentation

AlignedSize.height : real

The height of the item in logical pixels

AlignedSize.width : real

The width of the item in logical pixels

We use cookies to personalize content and to analyze our traffic. Please decide if you are willing to accept cookies from our website.