Bienvenue sur le forum !

Si vous souhaitez rejoindre la communauté, cliquez sur l'un de ces boutons !

Qt 5 : 5.8.0 - Qt Creator : 4.2.2 - Qt Installer : 2.0.3 - JOM : 1.1.2 - Qt Build suite : 1.7.0 - VS Qt 5 : 2.0.0

[QT4.1] problème de compilation d'un fichier ui

Bonjour,

Voici mon problème :

J'ai fait une petite fenetre de dialogue appélée viewStatus.ui(contient quelques label et autres, rien de bien méchant)

J'ai fait un main comme suite pour appeller cette fenetre de dialogue :
#include <QApplication>
#include <QDialog>


#include "ui_viewStatus.h"

int main(int argc, char *argv[])
{
QApplication app(argc, argv);

Ui::viewStatus ui;
QDialog *dialog = new QDialog;
ui.setupUi(dialog);
dialog->show();

return app.exec();
}
Mais lors de la compilation, j'ai une erreur lors du make de ce type :
C:\maquette_sdd\aaa>make
mingw32-make -f Makefile.Release
mingw32-make[1]: Entering directory `C:/maquette_sdd/aaa'
g++ -c -O2 -O2 -frtti -fexceptions -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_D
LL -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN
-I"C:/Qt/4.1.1/include/QtCore" -I"C:/Qt/4.1.1/include/QtGui" -I"C:/Qt/4.1.1/inc
lude" -I"." -I"C:/Qt/4.1.1/include/ActiveQt" -I"release" -I"." -I"C:/Qt/4.1.1/mk
specs/win32-g++" -o release\main.o main.cpp
main.cpp: In function `int qMain(int, char**)':
main.cpp:11: error: `viewStatus' is not a member of `Ui'
main.cpp:11: error: expected `;' before "ui"
main.cpp:13: error: `ui' undeclared (first use this function)
main.cpp:13: error: (Each undeclared identifier is reported only once for each f
unction it appears in.)
mingw32-make[1]: *** [release\main.o] Error 1
mingw32-make[1]: Leaving directory `C:/maquette_sdd/aaa'
mingw32-make: *** [release] Error 2

C:\maquette_sdd\aaa>
J'ai pourtant suivi un exemple trés simple pour me familiariser avec qt designer.

mon ui_viewStatus.h generer malgré l'erreur:
#ifndef UI_VIEWSTATUS_H
#define UI_VIEWSTATUS_H

#include <QtCore/QVariant>
#include <QtGui/QAction>
#include <QtGui/QApplication>
#include <QtGui/QButtonGroup>
#include <QtGui/QFrame>
#include <QtGui/QGroupBox>
#include <QtGui/QLabel>
#include <QtGui/QPushButton>
#include <QtGui/QTableWidget>
#include <QtGui/QWidget>

class Ui_StatusDisplay
{
public:
QTableWidget *tableWidget;
QGroupBox *general_fim;
QLabel *label;
QLabel *label_2;
QGroupBox *groupBox;
QLabel *label_14;
QLabel *label_15;
QLabel *label_22;
QLabel *label_24;
QLabel *label_23;
QLabel *label_21;
QLabel *label_16;
QLabel *label_18;
QLabel *label_29;
QLabel *label_31;
QLabel *label_20;
QLabel *label_28;
QLabel *label_25;
QPushButton *pushButton;
QLabel *label_13;
QLabel *label_17;
QLabel *label_19;
QLabel *label_26;
QLabel *label_27;
QLabel *label_30;
QLabel *label_32;
QFrame *line_2;
QGroupBox *groupBox_2;
QLabel *label_11;
QLabel *label_4;
QLabel *label_5;
QLabel *label_12;
QLabel *label_8;
QLabel *label_9;
QLabel *label_6;
QLabel *label_3;
QLabel *label_7;
QLabel *label_10;
QFrame *line;

void setupUi(QWidget *StatusDisplay)
{
StatusDisplay->setObjectName(QString::fromUtf8("StatusDisplay"));
StatusDisplay->setEnabled(true);
StatusDisplay->resize(QSize(1017, 910).expandedTo(StatusDisplay->minimumSizeHint()));
tableWidget = new QTableWidget(StatusDisplay);
tableWidget->setObjectName(QString::fromUtf8("tableWidget"));
tableWidget->setGeometry(QRect(10, 690, 1001, 192));
QPalette palette;
tableWidget->setPalette(palette);
general_fim = new QGroupBox(StatusDisplay);
general_fim->setObjectName(QString::fromUtf8("general_fim"));
general_fim->setGeometry(QRect(40, 40, 511, 91));
QPalette palette1;
general_fim->setPalette(palette1);
label = new QLabel(general_fim);
label->setObjectName(QString::fromUtf8("label"));
label->setGeometry(QRect(62, 29, 191, 51));
label_2 = new QLabel(general_fim);
label_2->setObjectName(QString::fromUtf8("label_2"));
label_2->setGeometry(QRect(310, 30, 101, 51));
groupBox = new QGroupBox(StatusDisplay);
groupBox->setObjectName(QString::fromUtf8("groupBox"));
groupBox->setGeometry(QRect(570, 40, 401, 631));
QPalette palette2;
groupBox->setPalette(palette2);
label_14 = new QLabel(groupBox);
label_14->setObjectName(QString::fromUtf8("label_14"));
label_14->setGeometry(QRect(30, 40, 201, 51));
label_15 = new QLabel(groupBox);
label_15->setObjectName(QString::fromUtf8("label_15"));
label_15->setGeometry(QRect(30, 110, 201, 51));
label_22 = new QLabel(groupBox);
label_22->setObjectName(QString::fromUtf8("label_22"));
label_22->setGeometry(QRect(30, 180, 201, 51));
label_24 = new QLabel(groupBox);
label_24->setObjectName(QString::fromUtf8("label_24"));
label_24->setGeometry(QRect(30, 250, 201, 51));
label_23 = new QLabel(groupBox);
label_23->setObjectName(QString::fromUtf8("label_23"));
label_23->setGeometry(QRect(260, 250, 101, 51));
label_21 = new QLabel(groupBox);
label_21->setObjectName(QString::fromUtf8("label_21"));
label_21->setGeometry(QRect(260, 180, 101, 51));
label_16 = new QLabel(groupBox);
label_16->setObjectName(QString::fromUtf8("label_16"));
label_16->setGeometry(QRect(260, 110, 101, 51));
label_18 = new QLabel(groupBox);
label_18->setObjectName(QString::fromUtf8("label_18"));
label_18->setGeometry(QRect(20, 340, 221, 31));
label_29 = new QLabel(groupBox);
label_29->setObjectName(QString::fromUtf8("label_29"));
label_29->setGeometry(QRect(20, 500, 221, 31));
label_31 = new QLabel(groupBox);
label_31->setObjectName(QString::fromUtf8("label_31"));
label_31->setGeometry(QRect(20, 540, 221, 31));
label_20 = new QLabel(groupBox);
label_20->setObjectName(QString::fromUtf8("label_20"));
label_20->setGeometry(QRect(20, 380, 224, 31));
label_28 = new QLabel(groupBox);
label_28->setObjectName(QString::fromUtf8("label_28"));
label_28->setGeometry(QRect(20, 460, 221, 31));
label_25 = new QLabel(groupBox);
label_25->setObjectName(QString::fromUtf8("label_25"));
label_25->setGeometry(QRect(20, 420, 221, 31));
pushButton = new QPushButton(groupBox);
pushButton->setObjectName(QString::fromUtf8("pushButton"));
pushButton->setGeometry(QRect(300, 590, 90, 28));
label_13 = new QLabel(groupBox);
label_13->setObjectName(QString::fromUtf8("label_13"));
label_13->setGeometry(QRect(260, 40, 101, 51));
label_17 = new QLabel(groupBox);
label_17->setObjectName(QString::fromUtf8("label_17"));
label_17->setGeometry(QRect(280, 340, 101, 31));
label_19 = new QLabel(groupBox);
label_19->setObjectName(QString::fromUtf8("label_19"));
label_19->setGeometry(QRect(280, 380, 101, 31));
label_26 = new QLabel(groupBox);
label_26->setObjectName(QString::fromUtf8("label_26"));
label_26->setGeometry(QRect(280, 420, 101, 31));
label_27 = new QLabel(groupBox);
label_27->setObjectName(QString::fromUtf8("label_27"));
label_27->setGeometry(QRect(280, 460, 101, 31));
label_30 = new QLabel(groupBox);
label_30->setObjectName(QString::fromUtf8("label_30"));
label_30->setGeometry(QRect(280, 500, 101, 31));
label_32 = new QLabel(groupBox);
label_32->setObjectName(QString::fromUtf8("label_32"));
label_32->setGeometry(QRect(280, 540, 101, 31));
line_2 = new QFrame(groupBox);
line_2->setObjectName(QString::fromUtf8("line_2"));
line_2->setGeometry(QRect(10, 310, 381, 21));
line_2->setFrameShape(QFrame::HLine);
groupBox_2 = new QGroupBox(StatusDisplay);
groupBox_2->setObjectName(QString::fromUtf8("groupBox_2"));
groupBox_2->setGeometry(QRect(40, 150, 511, 521));
QPalette palette3;
groupBox_2->setPalette(palette3);
label_11 = new QLabel(groupBox_2);
label_11->setObjectName(QString::fromUtf8("label_11"));
label_11->setGeometry(QRect(310, 390, 101, 51));
label_4 = new QLabel(groupBox_2);
label_4->setObjectName(QString::fromUtf8("label_4"));
label_4->setGeometry(QRect(310, 120, 101, 51));
label_5 = new QLabel(groupBox_2);
label_5->setObjectName(QString::fromUtf8("label_5"));
label_5->setGeometry(QRect(60, 50, 201, 51));
label_12 = new QLabel(groupBox_2);
label_12->setObjectName(QString::fromUtf8("label_12"));
label_12->setGeometry(QRect(60, 390, 201, 51));
label_8 = new QLabel(groupBox_2);
label_8->setObjectName(QString::fromUtf8("label_8"));
label_8->setGeometry(QRect(310, 190, 101, 51));
label_9 = new QLabel(groupBox_2);
label_9->setObjectName(QString::fromUtf8("label_9"));
label_9->setGeometry(QRect(60, 320, 201, 51));
label_6 = new QLabel(groupBox_2);
label_6->setObjectName(QString::fromUtf8("label_6"));
label_6->setGeometry(QRect(310, 50, 101, 51));
label_3 = new QLabel(groupBox_2);
label_3->setObjectName(QString::fromUtf8("label_3"));
label_3->setGeometry(QRect(60, 120, 201, 51));
label_7 = new QLabel(groupBox_2);
label_7->setObjectName(QString::fromUtf8("label_7"));
label_7->setGeometry(QRect(60, 190, 201, 51));
label_10 = new QLabel(groupBox_2);
label_10->setObjectName(QString::fromUtf8("label_10"));
label_10->setGeometry(QRect(310, 320, 101, 51));
line = new QFrame(groupBox_2);
line->setObjectName(QString::fromUtf8("line"));
line->setGeometry(QRect(10, 270, 491, 21));
line->setFrameShape(QFrame::HLine);
retranslateUi(StatusDisplay);

QMetaObject::connectSlotsByName(StatusDisplay);
} // setupUi

void retranslateUi(QWidget *StatusDisplay)
{
StatusDisplay->setWindowTitle(QApplication::translate("StatusDisplay", "DL-FEP Statuses Display", 0, QApplication::UnicodeUTF8));
tableWidget->clear();
tableWidget->setColumnCount(2);

QTableWidgetItem *__colItem = new QTableWidgetItem();
__colItem->setText(QApplication::translate("StatusDisplay", "type", 0, QApplication::UnicodeUTF8));
tableWidget->setHorizontalHeaderItem(0, __colItem);

QTableWidgetItem *__colItem1 = new QTableWidgetItem();
__colItem1->setText(QApplication::translate("StatusDisplay", " Message ", 0, QApplication::UnicodeUTF8));
tableWidget->setHorizontalHeaderItem(1, __colItem1);
tableWidget->setRowCount(5);

QTableWidgetItem *__rowItem = new QTableWidgetItem();
__rowItem->setText(QApplication::translate("StatusDisplay", "date", 0, QApplication::UnicodeUTF8));
tableWidget->setVerticalHeaderItem(0, __rowItem);

QTableWidgetItem *__rowItem1 = new QTableWidgetItem();
__rowItem1->setText(QApplication::translate("StatusDisplay", "date", 0, QApplication::UnicodeUTF8));
tableWidget->setVerticalHeaderItem(1, __rowItem1);

QTableWidgetItem *__rowItem2 = new QTableWidgetItem();
__rowItem2->setText(QApplication::translate("StatusDisplay", "date", 0, QApplication::UnicodeUTF8));
tableWidget->setVerticalHeaderItem(2, __rowItem2);

QTableWidgetItem *__rowItem3 = new QTableWidgetItem();
__rowItem3->setText(QApplication::translate("StatusDisplay", "date", 0, QApplication::UnicodeUTF8));
tableWidget->setVerticalHeaderItem(3, __rowItem3);

QTableWidgetItem *__rowItem4 = new QTableWidgetItem();
__rowItem4->setText(QApplication::translate("StatusDisplay", "date", 0, QApplication::UnicodeUTF8));
tableWidget->setVerticalHeaderItem(4, __rowItem4);

QTableWidgetItem *__item = new QTableWidgetItem();
__item->setText(QApplication::translate("StatusDisplay", "WARNING", 0, QApplication::UnicodeUTF8));
tableWidget->setItem(0, 0, __item);

QTableWidgetItem *__item1 = new QTableWidgetItem();
__item1->setText(QApplication::translate("StatusDisplay", "FDPS Connection is connected", 0, QApplication::UnicodeUTF8));
tableWidget->setItem(0, 1, __item1);
general_fim->setTitle(QApplication::translate("StatusDisplay", "FIM general Status", 0, QApplication::UnicodeUTF8));
label->setText(QApplication::translate("StatusDisplay", "<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
"p, li { white-space: pre-wrap; }\n"
"</style></head><body style=\" font-family:'console8x16'; font-size:14pt; font-weight:600; font-style:normal; text-decoration:none;\">\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-weight:400;\">General Status :</span></p></body></html>", 0, QApplication::UnicodeUTF8));
label_2->setText(QApplication::translate("StatusDisplay", "<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
"p, li { white-space: pre-wrap; }\n"
"</style></head><body style=\" font-family:'console8x16'; font-size:14pt; font-weight:600; font-style:normal; text-decoration:none;\">\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:18pt; font-weight:400; color:#dc143c;\">OFFLINE</span></p></body></html>", 0, QApplication::UnicodeUTF8));
groupBox->setTitle(QApplication::translate("StatusDisplay", "FIM Parameters", 0, QApplication::UnicodeUTF8));
label_14->setText(QApplication::translate("StatusDisplay", "<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
"p, li { white-space: pre-wrap; }\n"
"</style></head><body style=\" font-family:'console8x16'; font-size:14pt; font-weight:600; font-style:normal; text-decoration:none;\">\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-weight:400;\">BackEnd Link Name</span></p></body></html>", 0, QApplication::UnicodeUTF8));
label_15->setText(QApplication::translate("StatusDisplay", "<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
"p, li { white-space: pre-wrap; }\n"
"</style></head><body style=\" font-family:'console8x16'; font-size:14pt; font-weight:600; font-style:normal; text-decoration:none;\">\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-weight:400;\">Provider Link Name</span></p></body></html>", 0, QApplication::UnicodeUTF8));
label_22->setText(QApplication::translate("StatusDisplay", "<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
"p, li { white-space: pre-wrap; }\n"
"</style></head><body style=\" font-family:'console8x16'; font-size:14pt; font-weight:600; font-style:normal; text-decoration:none;\">\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-weight:400;\">Backend Link Protocol</span></p></body></html>", 0, QApplication::UnicodeUTF8));
label_24->setText(QApplication::translate("StatusDisplay", "<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
"p, li { white-space: pre-wrap; }\n"
"</style></head><body style=\" font-family:'console8x16'; font-size:14pt; font-weight:600; font-style:normal; text-decoration:none;\">\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Intended <span style=\" font-weight:400;\">FDPS Connection</span></p></body></html>", 0, QApplication::UnicodeUTF8));
label_23->setText(QApplication::translate("StatusDisplay", "<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
"p, li { white-space: pre-wrap; }\n"
"</style></head><body style=\" font-family:'console8x16'; font-size:14pt; font-weight:600; font-style:normal; text-decoration:none;\">\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-weight:400; color:#dc143c;\">OFFLINE</span></p></body></html>", 0, QApplication::UnicodeUTF8));
label_21->setText(QApplication::translate("StatusDisplay", "<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
"p, li { white-space: pre-wrap; }\n"
"</style></head><body style=\" font-family:'console8x16'; font-size:14pt; font-weight:600; font-style:normal; text-decoration:none;\">\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-weight:400; color:#0000ff;\">DFS</span></p></body></html>", 0, QApplication::UnicodeUTF8));
label_16->setText(QApplication::translate("StatusDisplay", "<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
"p, li { white-space: pre-wrap; }\n"
"</style></head><body style=\" font-family:'console8x16'; font-size:14pt; font-weight:600; font-style:normal; text-decoration:none;\">\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-weight:400; color:#0000ff;\">ATN</span></p></body></html>", 0, QApplication::UnicodeUTF8));
label_18->setText(QApplication::translate("StatusDisplay", "<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
"p, li { white-space: pre-wrap; }\n"
"</style></head><body style=\" font-family:'console8x16'; font-size:14pt; font-weight:600; font-style:normal; text-decoration:none;\">\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-weight:400;\">Backend Link Interface Name</span></p></body></html>", 0, QApplication::UnicodeUTF8));
label_29->setText(QApplication::translate("StatusDisplay", "<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
"p, li { white-space: pre-wrap; }\n"
"</style></head><body style=\" font-family:'console8x16'; font-size:14pt; font-weight:600; font-style:normal; text-decoration:none;\">\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-weight:400;\">BackEnd Link Int Bounded</span></p></body></html>", 0, QApplication::UnicodeUTF8));
label_31->setText(QApplication::translate("StatusDisplay", "<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
"p, li { white-space: pre-wrap; }\n"
"</style></head><body style=\" font-family:'console8x16'; font-size:14pt; font-weight:600; font-style:normal; text-decoration:none;\">\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-weight:400;\">Backend Link PhysicalInt</span></p></body></html>", 0, QApplication::UnicodeUTF8));
label_20->setText(QApplication::translate("StatusDisplay", "<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
"p, li { white-space: pre-wrap; }\n"
"</style></head><body style=\" font-family:'console8x16'; font-size:14pt; font-weight:600; font-style:normal; text-decoration:none;\">\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-weight:400;\">BackEnd Link Int Function</span></p></body></html>", 0, QApplication::UnicodeUTF8));
label_28->setText(QApplication::translate("StatusDisplay", "<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
"p, li { white-space: pre-wrap; }\n"
"</style></head><body style=\" font-family:'console8x16'; font-size:14pt; font-weight:600; font-style:normal; text-decoration:none;\">\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-weight:400;\">BackEnd Link ActualState</span></p></body></html>", 0, QApplication::UnicodeUTF8));
label_25->setText(QApplication::translate("StatusDisplay", "<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
"p, li { white-space: pre-wrap; }\n"
"</style></head><body style=\" font-family:'console8x16'; font-size:14pt; font-weight:600; font-style:normal; text-decoration:none;\">\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-weight:400;\">BackEnd Link IntendedState</span></p></body></html>", 0, QApplication::UnicodeUTF8));
pushButton->setText(QApplication::translate("StatusDisplay", "modify", 0, QApplication::UnicodeUTF8));
label_13->setText(QApplication::translate("StatusDisplay", "<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
"p, li { white-space: pre-wrap; }\n"
"</style></head><body style=\" font-family:'console8x16'; font-size:14pt; font-weight:600; font-style:normal; text-decoration:none;\">\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-weight:400; color:#0000ff;\">FDPS</span></p></body></html>", 0, QApplication::UnicodeUTF8));
label_17->setText(QApplication::translate("StatusDisplay", "<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
"p, li { white-space: pre-wrap; }\n"
"</style></head><body style=\" font-family:'console8x16'; font-size:14pt; font-weight:600; font-style:normal; text-decoration:none;\">\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-weight:400; color:#0000ff;\">Test System</span></p></body></html>", 0, QApplication::UnicodeUTF8));
label_19->setText(QApplication::translate("StatusDisplay", "<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
"p, li { white-space: pre-wrap; }\n"
"</style></head><body style=\" font-family:'console8x16'; font-size:14pt; font-weight:600; font-style:normal; text-decoration:none;\">\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-weight:400; color:#0000ff;\">ATN</span></p></body></html>", 0, QApplication::UnicodeUTF8));
label_26->setText(QApplication::translate("StatusDisplay", "<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
"p, li { white-space: pre-wrap; }\n"
"</style></head><body style=\" font-family:'console8x16'; font-size:14pt; font-weight:600; font-style:normal; text-decoration:none;\">\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-weight:400; color:#dc143c;\">OFFLINE</span></p></body></html>", 0, QApplication::UnicodeUTF8));
label_27->setText(QApplication::translate("StatusDisplay", "<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
"p, li { white-space: pre-wrap; }\n"
"</style></head><body style=\" font-family:'console8x16'; font-size:14pt; font-weight:600; font-style:normal; text-decoration:none;\">\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-weight:400; color:#dc143c;\">OFFLINE</span></p></body></html>", 0, QApplication::UnicodeUTF8));
label_30->setText(QApplication::translate("StatusDisplay", "<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
"p, li { white-space: pre-wrap; }\n"
"</style></head><body style=\" font-family:'console8x16'; font-size:14pt; font-weight:600; font-style:normal; text-decoration:none;\">\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-weight:400; color:#0000ff;\">ENABLE</span></p></body></html>", 0, QApplication::UnicodeUTF8));
label_32->setText(QApplication::translate("StatusDisplay", "<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
"p, li { white-space: pre-wrap; }\n"
"</style></head><body style=\" font-family:'console8x16'; font-size:14pt; font-weight:600; font-style:normal; text-decoration:none;\">\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-weight:400; color:#0000ff;\">ENABLE</span></p></body></html>", 0, QApplication::UnicodeUTF8));
groupBox_2->setTitle(QApplication::translate("StatusDisplay", "GroupBox", 0, QApplication::UnicodeUTF8));
label_11->setText(QApplication::translate("StatusDisplay", "<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
"p, li { white-space: pre-wrap; }\n"
"</style></head><body style=\" font-family:'console8x16'; font-size:14pt; font-weight:600; font-style:normal; text-decoration:none;\">\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-weight:400; color:#dc143c;\">OFFLINE</span></p></body></html>", 0, QApplication::UnicodeUTF8));
label_4->setText(QApplication::translate("StatusDisplay", "<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
"p, li { white-space: pre-wrap; }\n"
"</style></head><body style=\" font-family:'console8x16'; font-size:14pt; font-weight:600; font-style:normal; text-decoration:none;\">\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-weight:400; color:#dc143c;\">OFFLINE</span></p></body></html>", 0, QApplication::UnicodeUTF8));
label_5->setText(QApplication::translate("StatusDisplay", "<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
"p, li { white-space: pre-wrap; }\n"
"</style></head><body style=\" font-family:'console8x16'; font-size:14pt; font-weight:600; font-style:normal; text-decoration:none;\">\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-weight:400;\">FDPS Connection Status</span></p></body></html>", 0, QApplication::UnicodeUTF8));
label_12->setText(QApplication::translate("StatusDisplay", "<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
"p, li { white-space: pre-wrap; }\n"
"</style></head><body style=\" font-family:'console8x16'; font-size:14pt; font-weight:600; font-style:normal; text-decoration:none;\">\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Intended <span style=\" font-weight:400;\">APM Connection</span></p></body></html>", 0, QApplication::UnicodeUTF8));
label_8->setText(QApplication::translate("StatusDisplay", "<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
"p, li { white-space: pre-wrap; }\n"
"</style></head><body style=\" font-family:'console8x16'; font-size:14pt; font-weight:600; font-style:normal; text-decoration:none;\">\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-weight:400; color:#dc143c;\">OFFLINE</span></p></body></html>", 0, QApplication::UnicodeUTF8));
label_9->setText(QApplication::translate("StatusDisplay", "<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
"p, li { white-space: pre-wrap; }\n"
"</style></head><body style=\" font-family:'console8x16'; font-size:14pt; font-weight:600; font-style:normal; text-decoration:none;\">\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Intended <span style=\" font-weight:400;\">APM Connection</span></p></body></html>", 0, QApplication::UnicodeUTF8));
label_6->setText(QApplication::translate("StatusDisplay", "<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
"p, li { white-space: pre-wrap; }\n"
"</style></head><body style=\" font-family:'console8x16'; font-size:14pt; font-weight:600; font-style:normal; text-decoration:none;\">\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-weight:400; color:#006400;\">NEW FDPS</span></p></body></html>", 0, QApplication::UnicodeUTF8));
label_3->setText(QApplication::translate("StatusDisplay", "<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
"p, li { white-space: pre-wrap; }\n"
"</style></head><body style=\" font-family:'console8x16'; font-size:14pt; font-weight:600; font-style:normal; text-decoration:none;\">\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Intended <span style=\" font-weight:400;\">FDPS Connection</span></p></body></html>", 0, QApplication::UnicodeUTF8));
label_7->setText(QApplication::translate("StatusDisplay", "<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
"p, li { white-space: pre-wrap; }\n"
"</style></head><body style=\" font-family:'console8x16'; font-size:14pt; font-weight:600; font-style:normal; text-decoration:none;\">\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Actual <span style=\" font-weight:400;\">FDPS Connection</span></p></body></html>", 0, QApplication::UnicodeUTF8));
label_10->setText(QApplication::translate("StatusDisplay", "<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
"p, li { white-space: pre-wrap; }\n"
"</style></head><body style=\" font-family:'console8x16'; font-size:14pt; font-weight:600; font-style:normal; text-decoration:none;\">\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-weight:400; color:#dc143c;\">OFFLINE</span></p></body></html>", 0, QApplication::UnicodeUTF8));
Q_UNUSED(StatusDisplay);
} // retranslateUi

};

namespace Ui {
class StatusDisplay: public Ui_StatusDisplay {};
} // namespace Ui

#endif // UI_VIEWSTATUS_H
Sinon , j'ai fait dans l'odre :

1. qmake -project
2. qmake
3. make
Merci pour les réponses .

Réponses

  • D'apres ton fichier ui, ce n'est pas

    Ui::viewStatus ui;

    mais

    Ui::StatusDisplay ui;

    qu'il faudrait ecrire.

    P@sNox,
  • exact, j'avais trouvé, désolé pour la réponse tardif .

    Merci beaucoup !
  • Bravo et merci pasnox !!! Vous êtes le premier à répondre correctement à la question posée ! Après avoir consulté "The Art of building QT Applications de Molkentin" (où l'exemple p.93 reprend la même faute !!) et plusieurs forums, je trouve enfin l'explication correcte !
  • Bravo et merci pasnox !!! Vous êtes le premier à répondre correctement à la question posée ! Après avoir consulté "The Art of building QT Applications de Molkentin" (où l'exemple p.93 reprend la même faute !!) et plusieurs forums, je trouve enfin l'explication correcte !
Connectez-vous ou Inscrivez-vous pour répondre.