summaryrefslogtreecommitdiffstats
path: root/src/corelib/global
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/global')
-rw-r--r--src/corelib/global/qnamespace.h10
-rw-r--r--src/corelib/global/qnamespace.qdoc22
2 files changed, 32 insertions, 0 deletions
diff --git a/src/corelib/global/qnamespace.h b/src/corelib/global/qnamespace.h
index f5f7176670..810c55709c 100644
--- a/src/corelib/global/qnamespace.h
+++ b/src/corelib/global/qnamespace.h
@@ -1754,6 +1754,15 @@ public:
ChecksumItuV41
};
+ enum class HighDpiScaleFactorRoundingPolicy {
+ Unset,
+ Round,
+ Ceil,
+ Floor,
+ RoundPreferFloor,
+ PassThrough
+ };
+
#ifndef Q_QDOC
// NOTE: Generally, do not add QT_Q_ENUM if a corresponding Q_Q_FLAG exists.
QT_Q_ENUM(ScrollBarPolicy)
@@ -1840,6 +1849,7 @@ public:
QT_Q_ENUM(MouseEventSource)
QT_Q_FLAG(MouseEventFlag)
QT_Q_ENUM(ChecksumType)
+ QT_Q_ENUM(HighDpiScaleFactorRoundingPolicy)
QT_Q_ENUM(TabFocusBehavior)
#endif // Q_DOC
diff --git a/src/corelib/global/qnamespace.qdoc b/src/corelib/global/qnamespace.qdoc
index 0ff6be2049..886aedb4f3 100644
--- a/src/corelib/global/qnamespace.qdoc
+++ b/src/corelib/global/qnamespace.qdoc
@@ -3275,3 +3275,25 @@
\value ChecksumItuV41 Checksum calculation based on ITU-V.41.
*/
+
+/*!
+ \enum Qt::HighDpiScaleFactorRoundingPolicy
+ \since 5.14
+
+ This enum describes the possible High-DPI scale factor rounding policies, which
+ decide how non-integer scale factors (such as Windows 150%) are handled.
+
+ The active policy is set by calling QGuiApplication::setHighDdpiScaleFactorRoundingPolicy() before
+ the application object is created, or by setting the QT_SCALE_FACTOR_ROUNDING_POLICY
+ environment variable.
+
+ \sa QGuiApplication::setHighDdpiScaleFactorRoundingPolicy()
+ \sa AA_EnableHighDpiScaling.
+
+ \omitvalue Unset
+ \value Round Round up for .5 and above.
+ \value Ceil Always round up.
+ \value Floor Always round down.
+ \value RoundPreferFloor Round up for .75 and above.
+ \value PassThrough Don't round.
+*/