当前位置: 首页>>代码示例>>C++>>正文


C++ Q3VBoxLayout::addSpacing方法代码示例

本文整理汇总了C++中Q3VBoxLayout::addSpacing方法的典型用法代码示例。如果您正苦于以下问题:C++ Q3VBoxLayout::addSpacing方法的具体用法?C++ Q3VBoxLayout::addSpacing怎么用?C++ Q3VBoxLayout::addSpacing使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Q3VBoxLayout的用法示例。


在下文中一共展示了Q3VBoxLayout::addSpacing方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: QDialog

FileListDialog::FileListDialog(QWidget* parent,
			       QString const& _dialogTitle,
			       QString const& _listTitle,
			       char const * _filters[]) :
  QDialog(parent, "FileListDialog", TRUE),       // TRUE = modal dialog
  list_(NULL),
  delButton_(NULL),
  fileDialog_(NULL),
  modified_(false)
{
  resize(300, 200);
  setCaption(_dialogTitle);

  Q3VBoxLayout * topBox = new Q3VBoxLayout(this, 0, -1, "boxLayout");

  Q3VGroupBox * fileBox = new Q3VGroupBox(this, "fileBox");
  list_ = new Q3ListBox(fileBox, "list");

  Q3HBox * fileButtonsBox = new Q3HBox(fileBox, "fileButtons");
  QPushButton * addButton = new QPushButton("Add...", fileButtonsBox);
  delButton_ = new QPushButton("Remove", fileButtonsBox);

  fileDialog_ = new Q3FileDialog(this, "config file dialog", TRUE);

  topBox->addSpacing(10);
  topBox->addWidget(fileBox);
  fileBox->setTitle(_listTitle);

  topBox->addSpacing(10);
  Q3HBoxLayout * dialogButtonsBox = new Q3HBoxLayout(topBox, -1, "hBoxLayout");
  QSpacerItem * dBSpace = new QSpacerItem(0, 0);
  QPushButton * okButton = new QPushButton("OK", this);
  QPushButton * cancelButton = new QPushButton("Cancel", this);
  
  topBox->addSpacing(5);
  dialogButtonsBox->addItem(dBSpace);
  dialogButtonsBox->addWidget(okButton);
  dialogButtonsBox->addSpacing(5);
  dialogButtonsBox->addWidget(cancelButton);
  dialogButtonsBox->addSpacing(5);
  
  okButton->setDefault(true);

  static const char * filters[3] = { "all files (*)", NULL };

  fileDialog_->setCaption("File open dialog");
  fileDialog_->setFilters((_filters == NULL)? filters : _filters);

  // connect the dialogs functionality  
  connect(okButton,     SIGNAL(clicked()), SLOT(accept()));
  connect(cancelButton, SIGNAL(clicked()), SLOT(reject()));
  connect(addButton,    SIGNAL(clicked()), SLOT(add()));
  connect(delButton_,   SIGNAL(clicked()), SLOT(del()));

  selectListItem();
}
开发者ID:BackupTheBerlios,项目名称:miro-middleware-svn,代码行数:56,代码来源:FileListDialog.cpp

示例2: createFundamentalsPage

void StocksDialog::createFundamentalsPage ()
{
    QWidget *w = new QWidget(this);

    Q3VBoxLayout *vbox = new Q3VBoxLayout(w);
    vbox->setMargin(5);
    vbox->setSpacing(5);

    Setting fund;
    QString s, s2;
    index->getFundamentals(symbol, s2);
    fund.parse(s2);

    s = tr("Fundamentals: last updated ");
    s2 = "updateDate";
    QString s3;
    fund.getData(s2, s3);
    s.append(s3);
    fund.remove(s2);
    QStringList key;
    fund.getKeyList(key);
    key.sort();

    vbox->addSpacing(10);
    QLabel *label = new QLabel(s, w);
    vbox->addWidget(label);

    fundView = new Q3ListView(w);
    fundView->addColumn(tr("Description"));
    fundView->addColumn(tr("Value"));
    vbox->addWidget(fundView);

    int loop;
    for (loop = 0; loop < (int) key.count(); loop++)
    {
        fund.getData(key[loop], s);
        new Q3ListViewItem(fundView, key[loop], s);
    }

    if (! key.count())
        new Q3ListViewItem(fundView, tr("No data available."));

    addTab(w, tr("Fundamentals"));
}
开发者ID:redrhino,项目名称:qtstalker-qt4,代码行数:44,代码来源:StocksDialog.cpp

示例3: setupFinish

//===========================================================
//
void ImportWizard::setupFinish()
{
    m_finishPage = new QWidget(this);
    m_finishPage->hide();
    Q3VBoxLayout *vbox = new Q3VBoxLayout(m_finishPage, KDialog::marginHint());
    m_finishLbl = new QLabel(m_finishPage);
    m_finishLbl->setAlignment(Qt::AlignTop | Qt::AlignLeft);
    m_finishLbl->setWordWrap(true);

    vbox->addWidget(m_finishLbl);
    m_openImportedProjectCheckBox = new QCheckBox(i18n("Open imported project"),
            m_finishPage);
    m_openImportedProjectCheckBox->setChecked(true);
    vbox->addSpacing(KDialog::spacingHint());
    vbox->addWidget(m_openImportedProjectCheckBox);
    vbox->addStretch(1);

    addPage(m_finishPage, i18n("Success"));
}
开发者ID:JeremiasE,项目名称:KFormula,代码行数:21,代码来源:importwizard.cpp


注:本文中的Q3VBoxLayout::addSpacing方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。