On Fri, Aug 25, 2006 at 02:37:58PM +0200, Abdelrazak Younes wrote:
> I don't know why there is this line in the UI file but I know for sure
> that Ui classes are _not_ QWidget; there are not even QObject. So this
> QWidget inheritance is the right thing to do:
>
> class FloatPlacement : public QWidget, public Ui::FloatPlacementUi {
This is one way to do it out of three canonical versions mentioned in
the docs...
I personally use the
class FloatPlacement : public QWidget
{
private:
Ui::FloatPlacementUi * ui_;
}
approach as this effectively pimpls away everything pulled in by the
ui_*.h files, but it requires an explict constructor.
It's just a matter of taste I suppose.
> AFAIK, this allows to derive from other kind of widget if needed
> (QDialog for example).
All three approaches allow that (nowadays)
Andre'