blob: 1653fd4d2f781a94087da0191c1789747659531b (
plain)
12345678910111213141516171819 | // Copyright (C) 2016 The Qt Company Ltd.// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause#include <QtGui>#include <iostream>namespace textdocumentendsnippet {voidwrapper(){ QString contentString("One\nTwp\nThree"); QTextDocument *doc =newQTextDocument(contentString);//! [0]for(QTextBlock it = doc->begin(); it != doc->end(); it = it.next())std::cout << it.text().toStdString() <<"\n";//! [0]}// wrapper}//textdocumentendsnippet
|