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; }
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; }