Mh, also ich scheine zu doof zu sein.
Hier ist die ui_* Datei
Code: Alles auswählen
/********************************************************************************
** Form generated from reading UI file 'BankInfoAddNew.ui'
**
** Created: Thu 4. Feb 14:31:11 2010
** by: Qt User Interface Compiler version 4.6.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
#ifndef UI_BANKINFOADDNEW_H
#define UI_BANKINFOADDNEW_H
#include <QtCore/QVariant>
#include <QtGui/QAction>
#include <QtGui/QApplication>
#include <QtGui/QButtonGroup>
#include <QtGui/QDialog>
#include <QtGui/QDialogButtonBox>
#include <QtGui/QFormLayout>
#include <QtGui/QHeaderView>
#include <QtGui/QLabel>
#include <QtGui/QLineEdit>
#include <QtGui/QWidget>
QT_BEGIN_NAMESPACE
class Ui_dlgBankInfoAddNew
{
public:
QWidget *formLayoutWidget;
QFormLayout *formLayout;
QLabel *label;
QLineEdit *lineEditBankName;
QLabel *label_2;
QLineEdit *lineEditBankCode;
QLabel *label_3;
QLineEdit *lineEditAccountNumber;
QLabel *label_4;
QLineEdit *lineEditIban;
QLabel *label_5;
QLineEdit *lineEditSwift;
QDialogButtonBox *buttonBox;
void setupUi(QDialog *dlgBankInfoAddNew)
{
if (dlgBankInfoAddNew->objectName().isEmpty())
dlgBankInfoAddNew->setObjectName(QString::fromUtf8("dlgBankInfoAddNew"));
dlgBankInfoAddNew->resize(400, 197);
formLayoutWidget = new QWidget(dlgBankInfoAddNew);
formLayoutWidget->setObjectName(QString::fromUtf8("formLayoutWidget"));
formLayoutWidget->setGeometry(QRect(10, 20, 371, 161));
formLayout = new QFormLayout(formLayoutWidget);
formLayout->setObjectName(QString::fromUtf8("formLayout"));
formLayout->setFieldGrowthPolicy(QFormLayout::AllNonFixedFieldsGrow);
formLayout->setContentsMargins(0, 0, 0, 0);
label = new QLabel(formLayoutWidget);
label->setObjectName(QString::fromUtf8("label"));
formLayout->setWidget(0, QFormLayout::LabelRole, label);
lineEditBankName = new QLineEdit(formLayoutWidget);
lineEditBankName->setObjectName(QString::fromUtf8("lineEditBankName"));
formLayout->setWidget(0, QFormLayout::FieldRole, lineEditBankName);
label_2 = new QLabel(formLayoutWidget);
label_2->setObjectName(QString::fromUtf8("label_2"));
formLayout->setWidget(1, QFormLayout::LabelRole, label_2);
lineEditBankCode = new QLineEdit(formLayoutWidget);
lineEditBankCode->setObjectName(QString::fromUtf8("lineEditBankCode"));
formLayout->setWidget(1, QFormLayout::FieldRole, lineEditBankCode);
label_3 = new QLabel(formLayoutWidget);
label_3->setObjectName(QString::fromUtf8("label_3"));
formLayout->setWidget(2, QFormLayout::LabelRole, label_3);
lineEditAccountNumber = new QLineEdit(formLayoutWidget);
lineEditAccountNumber->setObjectName(QString::fromUtf8("lineEditAccountNumber"));
formLayout->setWidget(2, QFormLayout::FieldRole, lineEditAccountNumber);
label_4 = new QLabel(formLayoutWidget);
label_4->setObjectName(QString::fromUtf8("label_4"));
formLayout->setWidget(3, QFormLayout::LabelRole, label_4);
lineEditIban = new QLineEdit(formLayoutWidget);
lineEditIban->setObjectName(QString::fromUtf8("lineEditIban"));
formLayout->setWidget(3, QFormLayout::FieldRole, lineEditIban);
label_5 = new QLabel(formLayoutWidget);
label_5->setObjectName(QString::fromUtf8("label_5"));
formLayout->setWidget(4, QFormLayout::LabelRole, label_5);
lineEditSwift = new QLineEdit(formLayoutWidget);
lineEditSwift->setObjectName(QString::fromUtf8("lineEditSwift"));
formLayout->setWidget(4, QFormLayout::FieldRole, lineEditSwift);
buttonBox = new QDialogButtonBox(formLayoutWidget);
buttonBox->setObjectName(QString::fromUtf8("buttonBox"));
buttonBox->setOrientation(Qt::Horizontal);
buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::Ok);
formLayout->setWidget(5, QFormLayout::FieldRole, buttonBox);
retranslateUi(dlgBankInfoAddNew);
QObject::connect(buttonBox, SIGNAL(accepted()), dlgBankInfoAddNew, SLOT(accept()));
QObject::connect(buttonBox, SIGNAL(rejected()), dlgBankInfoAddNew, SLOT(reject()));
QMetaObject::connectSlotsByName(dlgBankInfoAddNew);
} // setupUi
void retranslateUi(QDialog *dlgBankInfoAddNew)
{
dlgBankInfoAddNew->setWindowTitle(QApplication::translate("dlgBankInfoAddNew", "Dialog", 0, QApplication::UnicodeUTF8));
label->setText(QApplication::translate("dlgBankInfoAddNew", "Bank name:", 0, QApplication::UnicodeUTF8));
label_2->setText(QApplication::translate("dlgBankInfoAddNew", "Bank code:", 0, QApplication::UnicodeUTF8));
label_3->setText(QApplication::translate("dlgBankInfoAddNew", "Account Number:", 0, QApplication::UnicodeUTF8));
label_4->setText(QApplication::translate("dlgBankInfoAddNew", "IBAN:", 0, QApplication::UnicodeUTF8));
label_5->setText(QApplication::translate("dlgBankInfoAddNew", "Swift:", 0, QApplication::UnicodeUTF8));
} // retranslateUi
};
namespace Ui {
class dlgBankInfoAddNew: public Ui_dlgBankInfoAddNew {};
} // namespace Ui
QT_END_NAMESPACE
#endif // UI_BANKINFOADDNEW_H
Hier ist die Header-Datei meines Wrappers
Code: Alles auswählen
#ifndef BANKINFOADDNEWDIALOG_H
#define BANKINFOADDNEWDIALOG_H
#include "ui_BankInfoAddNew.h"
class BankInfoAddNewDialog : public QWidget {
Q_OBJECT
private:
Ui::dlgBankInfoAddNew *_dialog;
public:
BankInfoAddNewDialog(QWidget *parent = 0);
protected:
signals:
};
#endif // BANKINFOADDNEWDIALOG_H
Die *.cpp Datei zum Wrapper
Code: Alles auswählen
#include "bankinfoaddnewdialog.h"
BankInfoAddNewDialog::BankInfoAddNewDialog(QWidget *parent) : QWidget(parent), _dialog(new Ui::dlgBankInfoAddNew)
{
_dialog->setupUi(this);
}
Und als Fehlermeldung gibt es folgendes:
Code: Alles auswählen
C:/_daten/temp/qtFin/bankinfoaddnewdialog.cpp:5: error: no matching function for call to 'Ui::dlgBankInfoAddNew::setupUi(BankInfoAddNewDialog* const)'
Das ist doch letztlich genau das gleiche was die in der Dokumentation machen, mal abgesehen davon das auch das Beispiel "The Multiple Inheritance Approach" so wie es in der Doku steht nicht geht.
Oder ich mache noch irgendwas, das ich nicht finde, falsch.