QTextEdit

class QTextBlock

The next() and previous() functions enable iteration over consecutive valid blocks in a document under the condition that the document is not modified by other means during the iteration process. Note that, although blocks are returned in sequence, adjacent blocks may come from different places in the document structure. The validity of a block can be determined by calling isValid().

QTextBlock provides comparison operators to make it easier to work with blocks: operator==() compares two block for equality, operator!=() compares two blocks for inequality, and operator<() determines whether a block precedes another in the same document.

Background Role
QLabel *imageLabel = new QLabel;
         QImage image("happyguy.png");
         imageLabel->setPixmap(QPixmap::fromImage(image));

         scrollArea = new QScrollArea;
         scrollArea->setBackgroundRole(QPalette::Dark);
         scrollArea->setWidget(imageLabel);

你可能感兴趣的:(3rdParty)