From kde-devel Wed Mar 08 08:42:58 2000 From: Daniel Date: Wed, 08 Mar 2000 08:42:58 +0000 To: kde-devel Subject: Using the doc-view model with a KTabCtl X-MARC-Message: https://marc.info/?l=kde-devel&m=95250511111380 My application uses a KTabCtl widget as the main view(AppView inherits KTabCtl), with three different tabs. This is giving me a hard time to follow the doc-view model, since things I see should be done in the view class, in my case they have to be done in the classes that define the widgets for each tab. Here's what the code looks like: void KonStructApp::initView() { view = new KonStructView(this); graphicWidget = new KonGraphic(view); view->addTab(graphicWidget,i18n("Design Module")); graphicWidget->setBackgroundColor(black); graphicWidget->setFrameStyle(QFrame::WinPanel|QFrame::Sunken); editWidget2 = new KEdit(kapp,view,"Calculation_Module"); editWidget2->setFocusPolicy(QWidget::StrongFocus); view->addTab(editWidget2,i18n("Calculation Module")); editWidget = new KEdit(kapp,view,"Results"); editWidget->setFocusPolicy(QWidget::StrongFocus); view->addTab(editWidget,i18n("Results")); doc->addView(view); setView(view); QString caption=kapp->getCaption(); setCaption(caption+": "+doc->getTitle()); connect(view, SIGNAL(tabSelected(int)),SLOT(slotToggleModule(int))); } so the thing is that my KonStructView class contains very little and the main activity grows arround the KonGraphic class. It seems to me this isn't the right way to use the view-doc model. Could someone explain me how to do it? Daniel de los Reyes Calvo dadecal@arq.upv.es