本文整理汇总了C++中QCheckBox::setMaximumHeight方法的典型用法代码示例。如果您正苦于以下问题:C++ QCheckBox::setMaximumHeight方法的具体用法?C++ QCheckBox::setMaximumHeight怎么用?C++ QCheckBox::setMaximumHeight使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QCheckBox
的用法示例。
在下文中一共展示了QCheckBox::setMaximumHeight方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: init
void OpenDistant::init() {
idRecipeToOpen = -1;
ui->categoriesBox->setContentsMargins(0,10,0,0);
/*ui->categoriesBox->setMinimumHeight(70);*/
QVBoxLayout *catLay = new QVBoxLayout(ui->scrollCatsContent);
catLay->setMargin(0);
catLay->setContentsMargins(0,10,0,0);
catLay->setSpacing(2);
foreach (QString cat, namesCats) {
QCheckBox *catI = new QCheckBox(cat);
catI->setMaximumHeight(21);
catI->setMinimumHeight(21);
catLay->addWidget(catI);
cboxes.append(catI);
connect(catI, SIGNAL(stateChanged(int)), this, SLOT(stateChanged()));;
}
示例2: QMainWindow
//.........这里部分代码省略.........
m_kView = new T2GLWidget(this, m_doc);
setCentralWidget(m_kView);
m_edDlg = new KwEdit(this, m_sett.disp, m_doc, m_kView); // need the view for tracking vec2s
m_edDlg->show();
m_edDlg->move(pos() + QPoint(width() - 20, 30));
m_control = new MyDialog(this);
QBoxLayout *control_l = new QVBoxLayout();
m_control->setLayout(control_l);
control_l->setMargin(0);
control_l->setSpacing(0);
QTabWidget *tabs = new QTabWidget();
control_l->addWidget(tabs);
m_contDlg = new ControlPanel(&m_sett.disp, this, m_doc, m_kView);
tabs->addTab(m_contDlg, "Config");
m_browse = new ProjBrowser(this, m_doc);
tabs->addTab(m_browse, "Browser");
tabs->setCurrentWidget(m_browse);
//tabs->setCurrentIndex(m_sett.gui.configWindowTab);
tabs->setCurrentIndex(0);
m_control->show();
m_control->move(pos() + QPoint(-30, 20));
m_control->resize(100, 100); // make it as small as possible
m_doc->model()->m_errAct = new ErrorHighlight(m_edDlg);
connect(m_kView, SIGNAL(message(const QString&)), this, SLOT(message(const QString&)));
connect(m_edDlg, SIGNAL(changedModel(DocSrc*)), m_doc, SLOT(calc(DocSrc*)));
connect(m_edDlg, SIGNAL(updateShaders()), m_doc, SLOT(compileShaders()));
// connect(m_kView, SIGNAL(decompProgChanged(const QString&)), m_edDlg, SLOT(curChanged(const QString&)));
connect(m_doc, SIGNAL(loaded()), m_kView, SLOT(newModelLoaded()));
//connect(m_doc, SIGNAL(loaded()), m_edDlg, SLOT(doVarsUpdate())); // parsed new text. vars defs may be wrong
connect(m_doc, SIGNAL(modelChanged()), m_kView, SLOT(updateGL()));
connect(m_doc, SIGNAL(progChanged()), m_kView, SLOT(redoFrameBuffers()));
connect(m_kView, SIGNAL(changedFBOs()), m_contDlg, SLOT(updateTexEdits()));
connect(m_kView, SIGNAL(makeGradientTex(int, const QString&)), m_contDlg, SLOT(externalGradient(int, const QString&)));
connect(m_doc, SIGNAL(progParamChanged()), m_kView, SLOT(updateGL()));
connect(m_doc, SIGNAL(addModelLine(const QString&)), m_edDlg, SLOT(addModelLine(const QString&)));
connect(m_contDlg, SIGNAL(changedRend()), m_doc, SLOT(calcNoParse())); // passes update
connect(m_contDlg, SIGNAL(changedFont()), m_kView, SLOT(updateCoordFont()));
connect(m_contDlg, SIGNAL(doUpdate()), m_kView, SLOT(updateGL())); // passes update
connect(m_contDlg, SIGNAL(resetView()), m_kView, SLOT(resetState()));
connect(m_contDlg, SIGNAL(resetLight()), m_kView, SLOT(resetLight()));
connect(m_contDlg, SIGNAL(changedTexFile(int)), m_kView, SLOT(setTexture(int)));
// connect(m_contDlg, SIGNAL(reassertTex(int)), m_kView, SLOT(rebindTexture(int)));
connect(m_contDlg, SIGNAL(saveMesh()), m_doc, SLOT(calcSave()));
connect(m_browse, SIGNAL(openDocText(DocElement*)), m_edDlg, SLOT(addPage(DocElement*)) );
connect(m_browse, SIGNAL(openPassConf(DocElement*)), m_edDlg, SLOT(addPage(DocElement*)) );
connect(m_browse, SIGNAL(commitGuiData()), m_edDlg, SLOT(commitAll()));
connect(m_doc, SIGNAL(goingToClearProg()), m_edDlg, SLOT(clearingProg()));
connect(m_doc, SIGNAL(didReadProg(ProgKeep*)), m_edDlg, SLOT(readProg(ProgKeep*)) );
connect(m_doc, SIGNAL(didReadProg(ProgKeep*)), m_browse, SLOT(readProg(ProgKeep*)) );
connect(m_doc, SIGNAL(didReadModel(DocSrc*)), m_browse, SLOT(readModel()) );
connect(m_doc, SIGNAL(didReadModel(DocSrc*)), m_edDlg, SLOT(readModel(DocSrc*)));
connect(&m_sett.disp.bVtxNormals, SIGNAL(changed()), m_doc, SLOT(calcNoParse())); // TBD - this is bad.
connect(m_contDlg->ui.clipSlider, SIGNAL(valueChanged(int)), m_kView, SLOT(setClipValue(int)));
m_kView->setContextMenuPolicy(Qt::ActionsContextMenu);
QPushButton *viewBot = new QPushButton("View");
viewBot->setMaximumSize(60, 19);
statusBar()->addPermanentWidget(viewBot);
QMenu *view = new QMenu("View");
viewBot->setMenu(view);
QPushButton *fpsBot = new QPushButton(QIcon(":/images/arrow-circle.png"), QString());
fpsBot->setMaximumSize(20, 19);
statusBar()->addPermanentWidget(fpsBot);
(new CheckBoxIn(&m_sett.disp.fullFps, fpsBot))->reload();
QCheckBox *vSyncBox = new QCheckBox("vSync");
vSyncBox->setMaximumHeight(19);
statusBar()->addPermanentWidget(vSyncBox);
(new CheckBoxIn(&m_sett.disp.vSync, vSyncBox))->reload();
QAction *confVis = new QAction("Display", view);
view->addAction(confVis);
m_control->connectAction(confVis);
QAction *editVis = new QAction("Edit", view);
view->addAction(editVis);
m_edDlg->connectAction(editVis);
m_kView->connectedInit();
processCmdArgs();
}