本文整理汇总了C++中QTabWidget::font方法的典型用法代码示例。如果您正苦于以下问题:C++ QTabWidget::font方法的具体用法?C++ QTabWidget::font怎么用?C++ QTabWidget::font使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QTabWidget
的用法示例。
在下文中一共展示了QTabWidget::font方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: connect
void
CQIllustratorAlignToolbar::
addWidgets()
{
QBoxLayout *layout = qobject_cast<QBoxLayout *>(CQIllustratorToolbar::layout());
QGridLayout *grid = new QGridLayout;
grid->setMargin(0); grid->setSpacing(2);
layout->addLayout(grid);
//-----
QTabWidget *tab = new QTabWidget;
QFont font = tab->font();
font.setPointSizeF(font.pointSizeF()*0.7);
tab->setFont(font);
//------
alignw_ = new CQAlignButtons;
tab->addTab(alignw_, "Align");
connect(alignw_, SIGNAL(alignLeft()), this, SIGNAL(alignLeft()));
connect(alignw_, SIGNAL(alignBottom()), this, SIGNAL(alignBottom()));
connect(alignw_, SIGNAL(alignRight()), this, SIGNAL(alignRight()));
connect(alignw_, SIGNAL(alignTop()), this, SIGNAL(alignTop()));
connect(alignw_, SIGNAL(alignHorizontal()), this, SIGNAL(alignHorizontal()));
connect(alignw_, SIGNAL(alignVertical()), this, SIGNAL(alignVertical()));
connect(alignw_, SIGNAL(alignLeftPreview()), this, SIGNAL(alignLeftPreview()));
connect(alignw_, SIGNAL(alignBottomPreview()), this, SIGNAL(alignBottomPreview()));
connect(alignw_, SIGNAL(alignRightPreview()), this, SIGNAL(alignRightPreview()));
connect(alignw_, SIGNAL(alignTopPreview()), this, SIGNAL(alignTopPreview()));
connect(alignw_, SIGNAL(alignHorizontalPreview()), this, SIGNAL(alignHorizontalPreview()));
connect(alignw_, SIGNAL(alignVerticalPreview()), this, SIGNAL(alignVerticalPreview()));
connect(alignw_, SIGNAL(alignPreviewClear()), this, SIGNAL(alignPreviewClear()));
//------
distw_ = new CQDistButtons;
tab->addTab(distw_, "Distribute");
//------
spreadw_ = new CQSpreadButtons;
tab->addTab(spreadw_, "Spread");
//------
grid->addWidget(tab, 0, 0, 2, 1);
//------
QLabel *olabel = new QLabel("<small><b>Offset</b></small>");
offset_ = new CQRealEdit(0.0);
offset_->setFocusPolicy(Qt::ClickFocus);
grid->addWidget(olabel , 0, 1);
grid->addWidget(offset_, 1, 1);
//------
anchor_ = new CQAlignAnchor;
connect(anchor_, SIGNAL(selectObject()), this, SIGNAL(selectAnchorObject()));
connect(anchor_, SIGNAL(selectPosition()), this, SIGNAL(selectAnchorPosition()));
connect(anchor_, SIGNAL(cancelSelect()), this, SIGNAL(cancelSelectAnchor()));
grid->addWidget(anchor_, 0, 2, 2, 1);
//------
grid->setColumnStretch(3, 1);
}