本文整理汇总了C++中QStatusBar::setMaximumHeight方法的典型用法代码示例。如果您正苦于以下问题:C++ QStatusBar::setMaximumHeight方法的具体用法?C++ QStatusBar::setMaximumHeight怎么用?C++ QStatusBar::setMaximumHeight使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QStatusBar
的用法示例。
在下文中一共展示了QStatusBar::setMaximumHeight方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: SetupUi
void QmitkCorrespondingPointSetsWidget::SetupUi()
{
QBoxLayout* lay1 = new QVBoxLayout(this);
// add status bar buttons
if (QTPropShowButtonBar)
{
QBoxLayout* lay2 = new QHBoxLayout();
lay1->addLayout(lay2);
lay2->stretch(true);
QStatusBar* statusBar = new QStatusBar(this);
statusBar->setMaximumHeight(25);
m_CreatePointSetBtn = new QToolButton();
m_CreatePointSetBtn->setAutoRaise(true);
m_CreatePointSetBtn->setIcon(QIcon(":/QtWidgetsExt/btnAddPointSet.png"));
m_CreatePointSetBtn->setToolTip(QString("Create new point set"));
connect(this->m_CreatePointSetBtn, SIGNAL(clicked()), this, SLOT(AddPointSet()));
statusBar->addWidget(m_CreatePointSetBtn);
m_AddPointsBtn = new QToolButton();
m_AddPointsBtn->setAutoRaise(true);
m_AddPointsBtn->setIcon(QIcon(":/QtWidgetsExt/btnSetPoints.png"));
m_AddPointsBtn->setToolTip(QString("Check to add new points (shift-click)"));
m_AddPointsBtn->setCheckable(true);
connect(this->m_AddPointsBtn, SIGNAL(clicked(bool)), this, SLOT(AddPointsMode(bool)));
statusBar->addWidget(m_AddPointsBtn);
m_MovePointUpBtn = new QToolButton();
m_MovePointUpBtn->setAutoRaise(true);
m_MovePointUpBtn->setIcon(QIcon(":/QtWidgetsExt/btnMoveUp.png"));
m_MovePointUpBtn->setToolTip(QString("Move selected point up"));
connect(this->m_MovePointUpBtn, SIGNAL(clicked()), this, SLOT(MoveSelectedPointUp()));
statusBar->addWidget(m_MovePointUpBtn);
m_MovePointDownBtn = new QToolButton();
m_MovePointDownBtn->setAutoRaise(true);
m_MovePointDownBtn->setIcon(QIcon(":/QtWidgetsExt/btnMoveDown.png"));
m_MovePointDownBtn->setToolTip(QString("Move selected point down"));
connect(this->m_MovePointDownBtn, SIGNAL(clicked()), this, SLOT(MoveSelectedPointDown()));
statusBar->addWidget(m_MovePointDownBtn);
m_RemovePointBtn = new QToolButton();
m_RemovePointBtn->setAutoRaise(true);
m_RemovePointBtn->setIcon(QIcon(":/QtWidgetsExt/btnRemovePoint.png"));
m_RemovePointBtn->setToolTip(QString("Remove selected point"));
connect(this->m_RemovePointBtn, SIGNAL(clicked()), this, SLOT(RemoveSelectedPoint()));
statusBar->addWidget(m_RemovePointBtn);
m_SwapSetsBtn = new QToolButton();
m_SwapSetsBtn->setAutoRaise(true);
m_SwapSetsBtn->setIcon(QIcon(":/QtWidgetsExt/btnSwapSets.png"));
m_SwapSetsBtn->setToolTip(QString("Swap the two selected point sets"));
m_SwapSetsBtn->setCheckable(true);
connect(this->m_SwapSetsBtn, SIGNAL(clicked(bool)), this, SLOT(SwapPointSets(bool)));
statusBar->addWidget(m_SwapSetsBtn);
// disable buttons
m_MovePointUpBtn->setEnabled(false);
m_MovePointDownBtn->setEnabled(false);
m_RemovePointBtn->setEnabled(false);
m_SwapSetsBtn->setEnabled(false);
m_AddPointsBtn->setEnabled(false);
lay2->addWidget(statusBar);
}
lay1->insertWidget(0,m_CorrespondingPointSetsView);
this->setLayout(lay1);
}