本文整理汇总了C++中QToolButton::setFixedHeight方法的典型用法代码示例。如果您正苦于以下问题:C++ QToolButton::setFixedHeight方法的具体用法?C++ QToolButton::setFixedHeight怎么用?C++ QToolButton::setFixedHeight使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QToolButton
的用法示例。
在下文中一共展示了QToolButton::setFixedHeight方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: QFrame
GofunDesktopEntrySettingsWidget::GofunDesktopEntrySettingsWidget(QWidget* parent) : QFrame(parent)
{
setSizePolicy(QSizePolicy::Minimum,QSizePolicy::Fixed);
QGridLayout* grid = new QGridLayout(this,3,3);
grid->layout()->setMargin(3);
grid->layout()->setSpacing(1);
caption = new QLineEdit(this);
comment = new QLineEdit(this);
icon_button = new QToolButton(this);
icon_button->setFixedWidth(32);
icon_button->setFixedHeight(32);
QToolButton* more = new QToolButton(Qt::RightArrow,this);
more->setFixedHeight(7);
connect(more,SIGNAL(clicked()),this,SLOT(showMoreSettings()));
connect(caption,SIGNAL(textChanged(const QString&)),this,SLOT(guessIcon(const QString&)));
grid->addWidget(icon_button,0,0);
grid->addWidget(new QLabel(tr("Caption"),this),0,1);
grid->addWidget(caption,0,2);
grid->addWidget(new QLabel(tr("Comment"),this),1,0);
grid->addMultiCellWidget(comment,1,1,1,2);
grid->addMultiCellWidget(more,2,2,0,2);
}
示例2: createFormatToolBar
QToolBar* MainWindow::createFormatToolBar()
{
QToolBar *pFormatBar = new QToolBar();
pFormatBar->setWindowTitle( "Format Bar" );
m_pCmbFont = new QFontComboBox;
m_pCmbFont->setEditable( false );
m_pCmbFont->setFocusPolicy( Qt::NoFocus );
m_pCmbFontPointSize = new QComboBox;
updateFontPointSize( m_pCmbFont->currentText() );
m_pCmbFontPointSize->setFocusPolicy( Qt::NoFocus );
QToolButton *pBtnMoreOptions = new QToolButton;
pBtnMoreOptions->setText( "More..." );
pBtnMoreOptions->setStyleSheet( "border: 1px solid #000000" );
pBtnMoreOptions->setFixedHeight( 20 );
pBtnMoreOptions->setFocusPolicy( Qt::NoFocus );
pFormatBar->addWidget( m_pCmbFont );
pFormatBar->addWidget( m_pCmbFontPointSize );
pFormatBar->addWidget( pBtnMoreOptions );
connect( m_pCmbFont, SIGNAL(currentIndexChanged(int)), this, SLOT(onFontFamilyChanged()) );
connect( m_pCmbFontPointSize, SIGNAL(currentIndexChanged(int)), this, SLOT(onFontPointSizeChanged()) );
connect( pBtnMoreOptions, SIGNAL(clicked()), this, SLOT(onFormatMoreBtnClicked()) );
return pFormatBar;
}
示例3: createButton
QToolButton* MenyBar::createButton(QString title) {
QToolButton *genericButton = new QToolButton(this);
genericButton->setText(title);
genericButton->setFixedHeight(50);
genericButton->setFixedWidth(100);
return genericButton;
}
示例4: getButton
QToolButton* ProcessingManager::getButton(const QString& icon, const QString& text, const QString& tooltip) {
QToolButton* button = new QToolButton();
button->setIcon(ApplicationData::icon(icon));
button->setText(text);
button->setIconSize(QSize(32, 32));
button->setFixedHeight(60);
button->setToolButtonStyle(Qt::ToolButtonTextUnderIcon);
button->setToolTip("Remove all images from queue");
return button;
}