本文整理汇总了C++中Q3GridLayout::setRowSpacing方法的典型用法代码示例。如果您正苦于以下问题:C++ Q3GridLayout::setRowSpacing方法的具体用法?C++ Q3GridLayout::setRowSpacing怎么用?C++ Q3GridLayout::setRowSpacing使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Q3GridLayout
的用法示例。
在下文中一共展示了Q3GridLayout::setRowSpacing方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: bd
TesterTestPage::TesterTestPage (QWidget *p) : QWidget (p)
{
fieldList.append(tr("Open"));
fieldList.append(tr("Close"));
fieldList.append(tr("Mid Point"));
Q3HBoxLayout *hbox = new Q3HBoxLayout(this);
hbox->setMargin(5);
hbox->setSpacing(10);
// left side grid
Q3GridLayout *grid = new Q3GridLayout(hbox);
grid->setColStretch(1, 1);
grid->setSpacing(5);
// trades area
tradeLong = new QCheckBox(tr("Long"), this);
grid->addWidget(tradeLong, 0, 0);
tradeShort = new QCheckBox(tr("Short"), this);
grid->addWidget(tradeShort, 1, 0);
QLabel *label = new QLabel(tr("Trade Delay"), this);
grid->addWidget(label, 2, 0);
tradeDelay = new QSpinBox(1, 999999, 1, this);
tradeDelay->setValue(1);
grid->addWidget(tradeDelay, 2, 1);
grid->setRowSpacing(grid->numRows(), 25);
// account area
label = new QLabel(tr("Account Balance"), this);
grid->addWidget(label, 4, 0);
account = new QSpinBox(0, 999999, 1, this);
account->setValue(10000);
grid->addWidget(account, 4, 1);
label = new QLabel(tr("Futures Margin"), this);
grid->addWidget(label, 5, 0);
margin = new QSpinBox(0, 999999, 1, this);
grid->addWidget(margin, 5, 1);
label = new QLabel(tr("Volume %"), this);
grid->addWidget(label, 6, 0);
volumePercent = new QSpinBox(0, 100, 1, this);
grid->addWidget(volumePercent, 6, 1);
grid->setRowSpacing(grid->numRows(), 25);
// commission area
commissionType = new QCheckBox(tr("Use Commission %"), this);
grid->addWidget(commissionType, 8, 0);
label = new QLabel(tr("Entry"), this);
grid->addWidget(label, 9, 0);
QDoubleValidator *dv = new QDoubleValidator(0, 99999999.0, 4, this, 0);
entryCom = new QLineEdit(QString::number(10), this);
entryCom->setValidator(dv);
grid->addWidget(entryCom, 9, 1);
label = new QLabel(tr("Exit"), this);
grid->addWidget(label, 10, 0);
QDoubleValidator *dv2 = new QDoubleValidator(0, 99999999.0, 4, this, 0);
exitCom = new QLineEdit(QString::number(10), this);
exitCom->setValidator(dv2);
grid->addWidget(exitCom, 10, 1);
grid->setRowStretch(grid->numRows() + 1, 1);
// vline sperarator
Q3Frame *line = new Q3Frame(this);
line->setFrameStyle(Q3Frame::VLine | Q3Frame::Plain);
hbox->addWidget(line);
// right side grid
grid = new Q3GridLayout(hbox);
grid->setColStretch(1, 1);
grid->setSpacing(5);
// test area
label = new QLabel(tr("Symbol"), this);
grid->addWidget(label, 0, 0);
Config config;
QString s, s2;
config.getData(Config::DataPath, s);
symbolButton = new SymbolButton(this, s, s2);
//.........这里部分代码省略.........