本文整理汇总了C++中Q3HBoxLayout::setResizeMode方法的典型用法代码示例。如果您正苦于以下问题:C++ Q3HBoxLayout::setResizeMode方法的具体用法?C++ Q3HBoxLayout::setResizeMode怎么用?C++ Q3HBoxLayout::setResizeMode使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Q3HBoxLayout
的用法示例。
在下文中一共展示了Q3HBoxLayout::setResizeMode方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: QPushButton
HIC::QHSpinBox::QHSpinBox(double minValue,double maxValue,double initialValue,double step,QWidget * parent,const char * name):QWidget(parent,name)
{
m_min_value = minValue;
m_max_value = maxValue;
m_step = step;
m_value = initialValue;
m_leftbutton = new QPushButton("<<",this,"leftbutton");
m_leftbutton->setAutoRepeat(true);
QObject::connect(m_leftbutton, SIGNAL(clicked()), this, SLOT(stepDown()));
m_rightbutton = new QPushButton(">>",this,"rightbutton");
m_rightbutton->setAutoRepeat(true);
QObject::connect(m_rightbutton ,SIGNAL(clicked()),this, SLOT(stepUp()));
m_lineedit = new QLineEdit(QString::number(m_value),this,"lineedit");
m_lineedit->setMaximumSize(60,20);
QObject::connect(m_lineedit, SIGNAL(returnPressed()), this, SLOT(returnPressed()));
Q3HBoxLayout * layout = new Q3HBoxLayout(this,1,5,"hspinlayout");
layout->addWidget(m_leftbutton);
layout->addWidget(m_lineedit);
layout->addWidget(m_rightbutton);
layout->setResizeMode(QLayout::SetFixedSize);
}