diff --git a/src/declarativeimports/core/units.cpp b/src/declarativeimports/core/units.cpp index d02835fa1..01a470384 100644 --- a/src/declarativeimports/core/units.cpp +++ b/src/declarativeimports/core/units.cpp @@ -96,7 +96,7 @@ void Units::setDevicePixelRatio(const qreal scale) } } -qreal Units::gridUnit() const +int Units::gridUnit() const { qDebug() << "FontMetrics: " << QApplication::font().pixelSize() << QFontMetrics(QApplication::font()).boundingRect("M"); qDebug() << " MRect" << QFontMetrics(QApplication::font()).boundingRect("M").size(); diff --git a/src/declarativeimports/core/units.h b/src/declarativeimports/core/units.h index 7f6da5cc7..26f73d9f4 100644 --- a/src/declarativeimports/core/units.h +++ b/src/declarativeimports/core/units.h @@ -35,7 +35,7 @@ class Units : public QObject * The fundamental unit of space that should be used for sizes, expressed in pixels. * Given the screen has an accurate DPI settings, it corresponds to a millimeter */ - Q_PROPERTY(qreal gridUnit READ gridUnit NOTIFY gridUnitChanged()) + Q_PROPERTY(int gridUnit READ gridUnit NOTIFY gridUnitChanged()) /** * units.iconSizes provides access to platform-dependent icon sizing @@ -75,7 +75,7 @@ public: bool eventFilter(QObject *watched, QEvent *event); - qreal gridUnit() const; + int gridUnit() const; /**