aboutsummaryrefslogtreecommitdiffstats
path: root/src/benchmarks/auto/creation/quick/delegates_fontmetrics.qml
diff options
context:
space:
mode:
Diffstat (limited to 'src/benchmarks/auto/creation/quick/delegates_fontmetrics.qml')
-rw-r--r--src/benchmarks/auto/creation/quick/delegates_fontmetrics.qml27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/benchmarks/auto/creation/quick/delegates_fontmetrics.qml b/src/benchmarks/auto/creation/quick/delegates_fontmetrics.qml
new file mode 100644
index 0000000..849dc0b
--- /dev/null
+++ b/src/benchmarks/auto/creation/quick/delegates_fontmetrics.qml
@@ -0,0 +1,27 @@
+import QtQuick 2.4
+import QmlBench 1.0
+
+// Tests the creation of FontMetrics with some simple props
+CreationBenchmark {
+ id: root;
+ count: 50;
+ staticCount: 2500;
+
+ property string fontName: {
+ if (Qt.platform.os == "osx") {
+ return "Helvetica"
+ } else if (Qt.platform.os == "linux") {
+ return "Open Sans"
+ } else if (Qt.platform.os == "windows") {
+ return "Arial"
+ }
+ }
+
+ delegate: Item {
+ FontMetrics {
+ font.family: root.fontName
+ }
+ }
+}
+
+