本文整理汇总了C++中QTextBrowser::setFontFamily方法的典型用法代码示例。如果您正苦于以下问题:C++ QTextBrowser::setFontFamily方法的具体用法?C++ QTextBrowser::setFontFamily怎么用?C++ QTextBrowser::setFontFamily使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QTextBrowser
的用法示例。
在下文中一共展示了QTextBrowser::setFontFamily方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: execute
void toAWR::execute(void)
{
try {
//QString sql=Statement->text();
//toQList params=toParamGet::getParam(this,sql);
//Result->query(sql,params);
//Result->query(sql,toQList());
QVariant vdbid = dbid->itemData(dbid->currentIndex());
QString dbids( vdbid.toStringList().at(0) );
QString insts( vdbid.toStringList().at(1) );
QVariant vf = fsnap->itemData(fsnap->currentIndex());
QVariant vt = tsnap->itemData(tsnap->currentIndex());
QString fsnaps( vf.toStringList().at(2) );
QString tsnaps( vt.toStringList().at(2) );
// toQList params;
// params.push_back(fsnaps);
// params.push_back(tsnaps);
TLOG(0,toDecorator,__HERE__)
<< "Dbid:" << dbids.toAscii().constData() << ' '
<< "Inst:" << insts.toAscii().constData() << ' '
<< "fsnap:" << fsnaps.toAscii().constData() << ' '
<< "tsnap:" << tsnaps.toAscii().constData() << std::endl;
try {
toQuery checkSnaps(connection(), SQLCheckSnaps, dbids, insts, fsnaps, tsnaps);
toQuery report(connection(),
"select NVL(output,' ') \n"
//"from table(dbms_workload_repository.awr_report_text( \n"
"from table(dbms_workload_repository.awr_report_html( \n"
" :dbid<char[40],in>, \n"
" :inst<char[40],in>, \n"
" :f<char[40],in>, \n"
" :t<char[40],in>, 0))",
dbids, insts, fsnaps, tsnaps);
QString reports;
while (!report.eof())
{
QString line = report.readValue();
reports += line;
reports += '\n';
}
std::cerr << reports.toAscii().constData() << std::endl;
QWidget *box = new QWidget(Tabs);
QVBoxLayout *vbox = new QVBoxLayout;
vbox->setSpacing(0);
vbox->setContentsMargins(0, 0, 0, 0);
box->setLayout(vbox);
vbox->addWidget(new QLabel(tr("AWR report"), box));
QTextBrowser *tb = new QTextBrowser(box);
tb->setFontFamily("monospace");
tb->setReadOnly(true);
tb->setText(reports);
//tb->setFontFamily("Courier");
vbox->addWidget(tb);
Tabs->addTab(box, tr("AWR Report"));
} catch (const toConnection::exception &t ) {
TOMessageBox::information(this, t, t);
}
} TOCATCH
}