Angus Leeming wrote:
Given that FloatPlacementUi derives from QWidget:
+ <class>FloatPlacementUi</class>
+ <widget class="QWidget" name="FloatPlacementUi" >

I don't think FloatPlacement needs to derive directly from QWidget:
-class FloatPlacement : public QWidget {
+class FloatPlacement : public QWidget, public Ui::FloatPlacementUi {


that's what i thought as well, but if i remove the inheritance from QWidget

- class FloatPlacement : public QWidget, public Ui::FloatPlacementUi {
+ class FloatPlacement : public public Ui::FloatPlacementUi {

then my compiler gives me this:

g++ -DHAVE_CONFIG_H -I. -I../../../../lyx-devel/src/frontends/qt4 -I../../../src -DQT_CLEAN_NAMESPACE -DQT_GENUINE_STR -DQT_NO_STL -DQT_NO_KEYWORDS -I../../../../lyx-devel/src -I../../../../lyx-devel/src/frontends -I../../../../lyx-devel/images -DQT_SHARED -I/usr/include/qt4 -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I../../../../lyx-devel/boost -I../../../../lyx-devel/src/frontends/controllers -Wextra -Wall -g -O -MT QFloat.lo -MD -MP -MF .deps/QFloat.Tpo -c ../../../../lyx-devel/src/frontends/qt4/QFloat.C -o QFloat.o ../../../../lyx-devel/src/frontends/qt4/FloatPlacement.h:23: warning: 'class FloatPlacement' has virtual functions but non-virtual destructor
./ui/QFloatUi.h: In member function 'void Ui_QFloatUi::setupUi(QDialog*)':
./ui/QFloatUi.h:37: error: 'class FloatPlacement' has no member named 'setObjectName' ./ui/QFloatUi.h:39: error: no matching function for call to 'QVBoxLayout::addWidget(FloatPlacement*&)' /usr/include/qt4/QtGui/qboxlayout.h:64: note: candidates are: void QBoxLayout::addWidget(QWidget*, int, Qt::Alignment) ../../../../lyx-devel/src/frontends/qt4/QFloat.C: In member function 'virtual void lyx::frontend::QFloat::build_dialog()': ../../../../lyx-devel/src/frontends/qt4/QFloat.C:45: error: no matching function for call to 'lyx::frontend::Qt2BC::addReadOnly(FloatPlacement*&)' ../../../../lyx-devel/src/frontends/controllers/BCView.h:113: note: candidates are: void lyx::frontend::GuiBC<Button, Widget>::addReadOnly(Widget*) [with Button = QPushButton, Widget = QWidget]

Reply via email to