QWidget* widget = new QWidget/*(0, Qt::FramelessWindowHint)*/; widget->setMinimumSize(700, 500); QTextBrowser* text = new QTextBrowser; QPushButton* buttonForward = new QPushButton(">>"); QPushButton* buttonBack = new QPushButton("<<"); QPushButton* buttonHome = new QPushButton("Home"); QHBoxLayout* layoutH = new QHBoxLayout; QVBoxLayout* layoutV = new QVBoxLayout; layoutH->addWidget(buttonBack); layoutH->addWidget(buttonHome); layoutH->addWidget(buttonForward); layoutH->addStretch(); layoutV->addWidget(text); layoutV->addLayout(layoutH); widget->setLayout(layoutV); widget->setWindowTitle(tr("Описание работы программы")); widget->setWindowIcon(QIcon( ":/images/help.png" )); text->setStyleSheet( "background: silver" ); widget->show();....}
<ul> <li><a href="findfile.html">Find File</a></li> <ul> <li><a href="filedialog.html">File Dialog</a></li> <li><a href="wildcardmatching.html">WildCard Matching</a></li> <li><a href="browse.html">Browse</a></li> </ul> <li><a href="openfile.html">Open File</a></li> </ul>
... connect(buttonBack, SIGNAL(clicked()), text, SLOT(backward())); connect(buttonForward, SIGNAL(clicked()), text, SLOT(forward())); connect(buttonHome, SIGNAL(clicked()), text, SLOT(home())); connect(text, SIGNAL(backwardAvailable(bool)), buttonBack, SLOT(setEnabled(bool))); connect(text, SIGNAL(forwardAvailable(bool)), buttonForward, SLOT(setEnabled(bool))); connect(text, SIGNAL(sourceChanged(QUrl)), widget, SLOT(update()));...
text->setOpenExternalLinks(true);