本文整理汇总了C++中QTabWidget::setDocumentMode方法的典型用法代码示例。如果您正苦于以下问题:C++ QTabWidget::setDocumentMode方法的具体用法?C++ QTabWidget::setDocumentMode怎么用?C++ QTabWidget::setDocumentMode使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QTabWidget
的用法示例。
在下文中一共展示了QTabWidget::setDocumentMode方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: file
EDATool::EDATool() {
this->setWindowTitle(tr("EDATool"));
boardScene = new QGraphicsScene();
boardView = new BoardView(this, boardScene);
if (!QCoreApplication::arguments().contains("-nogl"))
boardView->setViewport(new QGLWidget);
QTabWidget *tabs = new QTabWidget(this);
tabs->setFocusPolicy(Qt::NoFocus); // don't let the tab header itself steal focus
tabs->addTab(boardView, QString("Document"));
tabs->setDocumentMode(true);
this->setCentralWidget(tabs);
QDockWidget *temp = new QDockWidget(this);
QTreeWidget *tree = new QTreeWidget(this);
temp->setWindowTitle("Tool settings");
temp->setWidget(tree);
tree->setColumnCount(1);
tree->setHeaderLabel("Name");
this->addDockWidget(Qt::LeftDockWidgetArea, temp);
this->fileMenu = this->menuBar()->addMenu(tr("File"));
this->editMenu = this->menuBar()->addMenu(tr("Edit"));
this->placeMenu = this->menuBar()->addMenu(tr("&Place"));
QLabel *t = new QLabel("LOL FU");
t->setFrameStyle(QFrame::StyledPanel | QFrame::Sunken);
this->statusBar()->addPermanentWidget(t);
t = new QLabel("MOAR TESTING");
t->setFrameStyle(QFrame::StyledPanel | QFrame::Sunken);
this->statusBar()->addPermanentWidget(t);
this->statusBar()->showMessage("showmessage", 2000);
resize(700, 500);
//Board board;
toolBar = addToolBar("Tools");
toolBar->setIconSize(QSize(16, 16));
toolActionGroup = new QActionGroup(this);
SelectTool *selTool = new SelectTool(this);
selTool->install();
RouteTool *tool = new RouteTool(this);
tool->install();
cache = new QHash<QString, QGraphicsItemGroup*>();
QFile file("C:\\Users\\andreas\\workspace\\edatool\\test.brd");
EagleFormat *eagleFormat = new EagleFormat();
eagleFormat->read(&file,cache);
QHashIterator<QString, QGraphicsItemGroup*> i(*cache);
while (i.hasNext()) {
i.next();
QTreeWidgetItem *item = new QTreeWidgetItem(tree, QStringList(i.key()));
}
connect(tree,SIGNAL(currentItemChanged(QTreeWidgetItem*,QTreeWidgetItem*)),this,SLOT(itemClicked(QTreeWidgetItem*,QTreeWidgetItem*)));
}
示例2: createUi
void DynamicConnectionPageWindow::createUi()
{
QVBoxLayout *mainLayout = new QVBoxLayout();
QLabel *captionLabel = new QLabel(QString("<h3>%1</h3>").arg(windowInfo->caption));
mainLayout->addWidget(captionLabel);
QTabWidget *tab = new SubTabWidget();
tab->setDocumentMode(false);
formWidget = new QWidget();
QFormLayout *form = new QFormLayout();
createForm(form);
formWidget->setLayout(form);
tab->addTab(formWidget, IconUtil::getIcon("form"), tr("Options"));
editor = new CodeEditor();
editor->setWordWrapMode(QTextOption::WordWrap);
editor->setReadOnly(true);
tab->addTab(editor, IconUtil::getIcon("query"), tr("Query"));
mainLayout->addWidget(tab);
buttonBox=DialogHelper::createButtonBox(this);
mainLayout->addWidget(buttonBox);
setLayout(mainLayout);
connect(tab, SIGNAL(currentChanged(int)), this, SLOT(tabIndexChanged(int)));
QSize size = sizeHint();
if(size.width() < 350){
size.setWidth(350);
}
resize(size);
DialogHelper::centerWindow(this);
}
示例3: setDocumentMode
void QTabWidgetProto::setDocumentMode(bool set)
{
QTabWidget *item = qscriptvalue_cast<QTabWidget*>(thisObject());
if (item)
item->setDocumentMode(set);
}