Exemplo n.º 1
0
ZLDialogContent &ZLQtOptionsDialog::createTab(const ZLResourceKey &key) {
	QScrollView *sv = new QScrollView(myTabWidget);
	sv->setResizePolicy(QScrollView::AutoOneFit);
	sv->setFrameStyle(QFrame::NoFrame);
	
	ZLQtDialogContent *tab = new ZLQtDialogContent(sv->viewport(), tabResource(key));
	sv->addChild(tab->widget());
	myMenu->insertItem(::qtString(tab->displayName()), -1, myTabs.size());
	myTabWidget->addWidget(sv, myTabs.size());
	myTabs.push_back(tab);

	if(myTabs.size() == 1) {
		raiseTab(0);
	}

	return *tab;
}
Exemplo n.º 2
0
ZLDialogContent &ZLQtOptionsDialog::createTab(const ZLResourceKey &key) {
	ZLQtDialogContent *tab = new ZLQtDialogContent(this, tabResource(key));
	addTab(tab->widget(), ::qtString(tab->displayName()));
	myTabs.push_back(tab);
	return *tab;
}