blob: ad4e370d36f60758d891523696e6d509e3ecfbcf (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#include <QDebug>
#include <QTextBrowser>
#include <qtest.h>
class tst_QTextBrowser : public QObject
{
Q_OBJECT
private slots:
void largeDocumentsLazyLayout();
};
void tst_QTextBrowser::largeDocumentsLazyLayout()
{
QString sl;
for (int i = 0; i < 150000; ++i) {
sl.append("long long text\n");
}
QBENCHMARK {
QTextBrowser browser;
browser.setPlainText(sl);
browser.show();
}
}
QTEST_MAIN(tst_QTextBrowser)
#include "main.moc"
|