From kde-devel Mon Mar 31 08:11:52 2003 From: Waldo Bastian Date: Mon, 31 Mar 2003 08:11:52 +0000 To: kde-devel Subject: Re: Some problems porting an app X-MARC-Message: https://marc.info/?l=kde-devel&m=104909847813663 On Monday 31 March 2003 04:02, Alex wrote: > I have this error: > > fsmview.cpp: In method `void FSMView::addTran()': > fsmview.cpp:67: type `QTable' is not a base type for type `QWidget' > make: *** [fsmview.o] Error 1 > > And the source code, is just that: > > void FSMView::addTran() > { > QTable *temp = statetabs->currentPage(); > temp->setNumRows( temp->numRows() + 1); > } > > "statetabs", is a QTabWidget. statetabs->currentPage() returns QWidget *. You need to cast it explicitly to QTable *. For example: QTable *temp = dynamic_cast(statetabs->currentPage()); if (temp) temp->setNumRows( temp->numRows() + 1); Cheers, Waldo -- bastian@kde.org -=|[ SuSE, The Linux Desktop Experts ]|=- bastian@suse.com >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<