Bonjour,

Je débute en QT. J'ai plutôt l'habitude de programmer en java mais je me suis dit que ce serait très formateur pour moi de faire mon projet en QT. J'ai regardé rapidement la syntaxe du C++, histoire de me familiariser avec lui.

Donc, voilà en quoi consiste mon projet : parcourir un fichier ligne par ligne (à certaines positions de la ligne se trouvent des chaînes de caractères bien précises) et sélectionner les lignes en fonction d'une chaîne qui se trouve à une position donnée, puis modifier une partie des chaînes de caractères des lignes sélectionnées.

Je voulais faire du MVC mais j'ai remis à plus tard, le temps de régler mon problème. En effet, une fois réglées toutes les fautes de syntaxe (ça m'a pris un temps fou), l'erreur suivante est générée au moment du lancement : "collect2: ld returned 1 exit status".

Voici le code du fichier censé contenir l'interface graphique :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
 
/**
 * \file RumSelectorView.cpp
 * \author Marie-Madeleine MAULU - Reseau Perinatalite Naitre en Alsace
 * \brief NB : UF = Unite fonctionnelle
 * \date 26.06.2009
 */
 
#include <QtGui>
#include <QLineEdit>
#include "rumselectorview.h"
#include "ui_rumselectorview.h"
#include "rumselectorctrl.h"
 
/** \brief The constructor */
RumSelectorView::RumSelectorView(QWidget *parent) : QMainWindow(parent)
{
    setupUi(this);
 
    connect(cancelButton, SIGNAL(pressed()), this, SLOT(on_cancelButton_clicked()));
    connect(buttonBrowseIn, SIGNAL(pressed()), this, SLOT(on_buttonBrowseIn_clicked()));
    connect(buttonBrowseOut, SIGNAL(pressed()), this, SLOT(on_buttonBrowseOut_clicked()));
    connect(generateButton, SIGNAL(pressed()), this, SLOT(on_generateButton_click()));
}
 
/** \brief The destructor */
RumSelectorView::~RumSelectorView()
{
 
}
 
/** \brief Window closure function */
void RumSelectorView::on_cancelButton_click()
{
    this->close();
}
 
/** \brief File system browser */
void RumSelectorView::on_buttonBrowseIn_click()
{
    QFileDialog dialog(this);
    dialog.setFileMode(QFileDialog::ExistingFile);
    dialog.setNameFilter(tr("Fichiers texte ou Excel (*.dat *.txt *.csv *.xls);; Tous les fichiers (*.*)"));
    dialog.setViewMode(QFileDialog::List);
    QStringList fileNames;
    if(dialog.exec())
    {
        fileNames = dialog.selectedFiles();
        textIn->setText(fileNames.at(0));
    }
    else
        dialog.reject();
}
 
/** \brief File system browser */
void RumSelectorView::on_buttonBrowseOut_click()
{
    QFileDialog dialog(this);
    dialog.setNameFilter(tr("Fichiers texte ou Excel (*.dat *.txt *.csv *.xls);; Tous les fichiers (*.*)"));
    dialog.setViewMode(QFileDialog::List);
    QString fileName;
    if(dialog.exec())
    {
        fileName = dialog.getSaveFileName();
        textOut->setText(fileName);
    }
    else
        dialog.reject();
}
 
/** \brief Generate the filtered file */
void RumSelectorView::on_generateButton_click()
{
    /*rumC->setCMD1(txtCMD1->text());
    rumC->setCMD2(txtCMD2->text());
    rumC->setUF1(txtUF1->text());
    rumC->setUF2(txtUF2->text());
    rumC->setUF3(txtUF3->text());
    rumC->setUF4(txtUF4->text());
    rumC->setUF5(txtUF5->text());
    rumC->setUF6(txtUF6->text());*/
    QString nameIn = textIn->text();
    QString nameOut = textOut->text();
    /*rumC->setTxtIn(nameIn);
    rumC->setTxtOut(nameOut);
    rumC->callRumSelectorModel();*/
    QStringList UFL;
    UFL.append(txtUF1->text());
    UFL.append(txtUF2->text());
    UFL.append(txtUF3->text());
    UFL.append(txtUF4->text());
    UFL.append(txtUF5->text());
    UFL.append(txtUF6->text());
    RumSelectorModel::RumSelectorModel rumM(nameIn, nameOut, UFL);
    rumM.generateAnonymRum();
}
Le .h coresspondant :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
 
/**
 * \file RumSelectorModel.cpp
 * \author Marie-Madeleine MAULU - Reseau Perinatalite Naitre en Alsace
 * \brief NB : UF = Unite fonctionnelle
 * \date 26.06.2009
 */
#ifndef RUMSELECTORVIEW_H
#define RUMSELECTORVIEW_H
 
#include "ui_rumselectorview.h"
#include "rumselectorctrl.h"
 
 
class RumSelectorView : public QMainWindow, private Ui::RumSelectorView
{
    Q_OBJECT
 
public:
    RumSelectorView(QWidget *parent = 0);
    ~RumSelectorView();
 
private slots:
    void on_cancelButton_click();
    void on_buttonBrowseIn_click();
    void on_buttonBrowseOut_click();
    void on_generateButton_click();
private:
    Ui::RumSelectorView ui;
    //RumSelectorCtrl * rumC;
};
 
#endif // RUMSELECTORVIEW_H
Et celui de la classe métier :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
 
/**
 * \file RumSelectorModel.cpp
 * \author Marie-Madeleine MAULU - Reseau Perinatalite Naitre en Alsace
 * \brief NB : UF = Unite fonctionnelle
 * \date 26.06.2009
 */
 
#include "rumselectormodel.h"
#include<QString>
#include<QChar>
#include<QIODevice>
#include<QFile>
#include<QTextStream>
 
/** \brief The constructor */
RumSelectorModel::RumSelectorModel(QString fIn, QString fOut, QStringList ufL)
{
    zipCode = new QString[6616];
    codeGeo = new QString[6616];
    init(); // Initialises the code tables
    fileNameIn = fIn; // Initialises the input file name
    fileNameOut = fOut; // Initialises the output file name
    UFList = ufL; // Retrieves all the UF numbers entered
    formatPos = 10 - 1;
}
 
/** \brief The destructor */
RumSelectorModel::~RumSelectorModel()
{
    delete zipCode;
    delete codeGeo;
}
 
/** \brief intialises the zip code table and the geographic code tables
 *
 */
void RumSelectorModel::init()
{
    QFile codeGeoFile("lib/codeGeo.txt");
    QFile codePostFile("lib/codePost.txt");
    QTextStream geoIn(&codeGeoFile);
    QTextStream postIn(&codePostFile);
    int i = 0;
    int j = 0;
 
    while(!postIn.atEnd() && codePostFile.open(QIODevice::ReadOnly))
    {
        QString code = postIn.readLine();
        zipCode[i] = code;
        i++;
    }
    while(!geoIn.atEnd() && codeGeoFile.open(QIODevice::WriteOnly))
    {
        QString geo = geoIn.readLine();
        codeGeo[j] = geo;
        j++;
    }
}
 
/** \brief  Changes the birth date in age and the geographic code in geographic code
 * \param l the line to transform
 */
QString RumSelectorModel::transform(QString l)
{
    QString birthDate = "";
    QString outDate   = "";
    QString zipCode   = "";
 
    for(int i = 0; i < 8; i++)
    {
        birthDate.append(l.at(birthDatePos + i));
        outDate.append(l.at(outDatePos + i));
    }
    QString age = setAge(birthDate, outDate);
 
    for(int i = 0; i < 5; i++)
    {
        zipCode.append(l.at(zipCodePos + i));
    }
    QString codeGeo = setCode(zipCode);
    QString newLine = "";
    QString spaces  = "      ";
    newLine.append(l);
    newLine.replace(birthDatePos, 8, spaces.append(age));
    newLine.replace(zipCodePos, 5, codeGeo);
 
    return newLine;
}
 
/** \brief Returns the age on the 31st december of the exit year
 *  \param birth the birth date
 *  \param out the exit date
 *  \return the age
*/
QString RumSelectorModel::setAge(QString birth, QString out)
{
    if(birth.length() != 8 || out.length() != 8)
        return "";
 
    QString birthYear = "";
    QString outYear = "";
    for(int i = 0; i < 4; i++)
    {
        birthYear.append(birth.at(4 + i));
        outYear.append(out.at(4 + i));
    }
    bool ok;
    QString result;
    return result.setNum(outYear.toInt(&ok) - birthYear.toInt(&ok));
}
 
/** \brief Returns the geographic code
 *  \param the zip code
 *  \return the geographic code
 */
QString RumSelectorModel::setCode(QString zip)
{
    for(unsigned int i = 0; i < sizeof(zipCode)/sizeof(QString); i++)
        if(QString::compare(zip, zipCode[i], Qt::CaseInsensitive) == 0)
            return codeGeo[i];
    return "";
}
 
/** \brief generate the anonym RSS
 */
void RumSelectorModel::generateAnonymRum()
{
    QFile fileIn(fileNameIn);
    QFile fileOut(fileNameOut);
    if(fileIn.open(QIODevice::ReadOnly))
    {
         QTextStream in(&fileIn);
         if(fileOut.open(QIODevice::WriteOnly))
         {
             while (!in.atEnd())
             {
                QString line = in.readLine(); // Retrieves the current line
                QString newLine;
                QString formatRSS = "";
 
                for(int i = 0; i < 3; i++)
                    formatRSS.append(line.at(formatPos + i)); // Retrieves the RSS format
 
                if(QString::compare(formatRSS, "112", Qt::CaseInsensitive) == 0)// The item positions are different in the different RSS
                {
                    birthDatePos = 55 - 1;
                    zipCodePos   = 93 - 1;
                    numUFPos     = 64 - 1;
                    outDatePos   = 83 - 1;
                }
                else // RSS format equals 113 or 114
                {
                    birthDatePos = 78  - 1;
                    zipCodePos   = 113 - 1;
                    numUFPos     = 87  - 1;
                    outDatePos   = 103 - 1;
                }
 
                QString CMD = "";
                QString UF  = "";
                for(int i = 0; i < 2; i++)
                   CMD.append(line.at(2 + i)); // Retrieves the CMD number
                for(int i; i < 4; i++)
                    UF.append(line.at(numUFPos + i)); // Retrieves the UF number
 
                if(CMD == "14" || CMD == "15")
                {
                    for(int i; i < 4; i++) // Compares the UF number with the UF numbers in the table
                    {
                        if(QString::compare(UF, UFList.at(i), Qt::CaseInsensitive) == 0)
                        {
                            newLine = transform(line);
                            QTextStream out(&fileOut);
                            out << newLine;
                        }
                    }
                }
            }
            fileOut.close();
        }
        fileIn.close();
     }
}
accompagnée du .h correspondant :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
 
/**
 * \file RumSelectorModel.cpp
 * \author Marie-Madeleine MAULU - Reseau Perinatalite Naitre en Alsace
 * \brief NB : UF = Unite fonctionnelle
 * \date 26.06.2009
 */
#ifndef RUMSELECTORMODEL_H
#define RUMSELECTORMODEL_H
 
#include <QObject>
#include <QFile>
#include <QStringList>
 
class RumSelectorModel
{
    public :
            /** \brief Constructor */
            RumSelectorModel(QString fIn, QString fOut, QStringList ufL);
            /** \brief Destructor */
            ~RumSelectorModel();
            /** \brief Initialises the code tables */
            void init();
            /** \brief The function that modifies the line if it is selected */
            QString transform(QString l);
            /** \brief The function that changes the birth date in age ( = exit date - birth date */
            QString setAge(QString birthDate, QString outDate);
            /** \brief The function that replaces the zip code by the geographic code */
            QString setCode(QString zipCode);
            void generateAnonymRum();
   private :
            /** \brief Input file name */
            QString fileNameIn;
            /** \brief RSS format position */
            size_t formatPos;
            /** \brief Birth date positon */
            size_t birthDatePos;
            /** \brief Zip code position */
            size_t zipCodePos;
            /** \brief UF number position */
            size_t numUFPos;
            /** \brief Exit date position */
            size_t outDatePos;
            /** \brief Output file name */
            QString fileNameOut;
            /** \brief UF number table */
            QStringList UFList;
            /** \brief Zip code table*/
            QString * zipCode;
            /** \brief Geographic code table */
            QString * codeGeo;
};
 
#endif // RUMSELECTORMODEL_H
Voici le fichier généré par la création de l'interface graphique au cas où :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
 
/********************************************************************************
** Form generated from reading ui file 'rumselectorview.ui'
**
** Created: Mon 6. Jul 12:50:32 2009
**      by: Qt User Interface Compiler version 4.5.1
**
** WARNING! All changes made in this file will be lost when recompiling ui file!
********************************************************************************/
 
#ifndef UI_RUMSELECTORVIEW_H
#define UI_RUMSELECTORVIEW_H
 
#include <QtCore/QVariant>
#include <QtGui/QAction>
#include <QtGui/QApplication>
#include <QtGui/QButtonGroup>
#include <QtGui/QGridLayout>
#include <QtGui/QHBoxLayout>
#include <QtGui/QHeaderView>
#include <QtGui/QLabel>
#include <QtGui/QLineEdit>
#include <QtGui/QMainWindow>
#include <QtGui/QMenu>
#include <QtGui/QMenuBar>
#include <QtGui/QPushButton>
#include <QtGui/QSpacerItem>
#include <QtGui/QStatusBar>
#include <QtGui/QToolBar>
#include <QtGui/QWidget>
 
QT_BEGIN_NAMESPACE
 
class Ui_RumSelectorView
{
public:
    QAction *action_A_propos_de;
    QAction *actionQuitter;
    QAction *actionLicence;
    QWidget *centralWidget;
    QWidget *gridLayoutWidget;
    QGridLayout *gLayout;
    QLabel *labelTitle;
    QLabel *labelIn;
    QLineEdit *textIn;
    QPushButton *generateButton;
    QPushButton *buttonBrowseIn;
    QPushButton *cancelButton;
    QLabel *labelOut;
    QLineEdit *textOut;
    QPushButton *buttonBrowseOut;
    QSpacerItem *horizontalSpacer;
    QSpacerItem *horizontalSpacer_3;
    QSpacerItem *horizontalSpacer_5;
    QSpacerItem *horizontalSpacer_2;
    QHBoxLayout *hLayout1;
    QLabel *lblCMD;
    QSpacerItem *horizontalSpacer_8;
    QLineEdit *txtCMD1;
    QSpacerItem *horizontalSpacer_7;
    QLineEdit *txtCMD2;
    QSpacerItem *horizontalSpacer_6;
    QSpacerItem *horizontalSpacer_4;
    QHBoxLayout *hLayout2;
    QLabel *lblUF;
    QLineEdit *txtUF1;
    QSpacerItem *horizontalSpacer_11;
    QLineEdit *txtUF2;
    QSpacerItem *horizontalSpacer_12;
    QLineEdit *txtUF3;
    QSpacerItem *horizontalSpacer_9;
    QHBoxLayout *hLayout3;
    QLabel *lblUF2;
    QLineEdit *txtUF4;
    QSpacerItem *horizontalSpacer_14;
    QLineEdit *txtUF5;
    QSpacerItem *horizontalSpacer_15;
    QLineEdit *txtUF6;
    QSpacerItem *horizontalSpacer_16;
    QSpacerItem *horizontalSpacer_10;
    QMenuBar *menuBar;
    QMenu *menuFichiers;
    QMenu *menu;
    QToolBar *mainToolBar;
    QStatusBar *statusBar;
 
    void setupUi(QMainWindow *RumSelectorView)
    {
        if (RumSelectorView->objectName().isEmpty())
            RumSelectorView->setObjectName(QString::fromUtf8("RumSelectorView"));
        RumSelectorView->resize(581, 514);
        QSizePolicy sizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred);
        sizePolicy.setHorizontalStretch(0);
        sizePolicy.setVerticalStretch(0);
        sizePolicy.setHeightForWidth(RumSelectorView->sizePolicy().hasHeightForWidth());
        RumSelectorView->setSizePolicy(sizePolicy);
        QFont font;
        font.setFamily(QString::fromUtf8("Comic Sans MS"));
        font.setPointSize(10);
        RumSelectorView->setFont(font);
        QIcon icon;
        icon.addPixmap(QPixmap(QString::fromUtf8("lib/entete.GIF")), QIcon::Normal, QIcon::Off);
        RumSelectorView->setWindowIcon(icon);
        action_A_propos_de = new QAction(RumSelectorView);
        action_A_propos_de->setObjectName(QString::fromUtf8("action_A_propos_de"));
        actionQuitter = new QAction(RumSelectorView);
        actionQuitter->setObjectName(QString::fromUtf8("actionQuitter"));
        actionLicence = new QAction(RumSelectorView);
        actionLicence->setObjectName(QString::fromUtf8("actionLicence"));
        centralWidget = new QWidget(RumSelectorView);
        centralWidget->setObjectName(QString::fromUtf8("centralWidget"));
        gridLayoutWidget = new QWidget(centralWidget);
        gridLayoutWidget->setObjectName(QString::fromUtf8("gridLayoutWidget"));
        gridLayoutWidget->setGeometry(QRect(10, 10, 541, 441));
        gLayout = new QGridLayout(gridLayoutWidget);
        gLayout->setSpacing(6);
        gLayout->setMargin(11);
        gLayout->setObjectName(QString::fromUtf8("gLayout"));
        gLayout->setContentsMargins(0, 0, 0, 0);
        labelTitle = new QLabel(gridLayoutWidget);
        labelTitle->setObjectName(QString::fromUtf8("labelTitle"));
        QFont font1;
        font1.setFamily(QString::fromUtf8("Comic Sans MS"));
        font1.setPointSize(15);
        font1.setBold(false);
        font1.setWeight(50);
        labelTitle->setFont(font1);
        labelTitle->setAlignment(Qt::AlignCenter);
 
        gLayout->addWidget(labelTitle, 0, 0, 1, 1);
 
        labelIn = new QLabel(gridLayoutWidget);
        labelIn->setObjectName(QString::fromUtf8("labelIn"));
        QFont font2;
        font2.setFamily(QString::fromUtf8("Comic Sans MS"));
        font2.setPointSize(10);
        font2.setBold(false);
        font2.setWeight(50);
        labelIn->setFont(font2);
 
        gLayout->addWidget(labelIn, 7, 0, 1, 1);
 
        textIn = new QLineEdit(gridLayoutWidget);
        textIn->setObjectName(QString::fromUtf8("textIn"));
 
        gLayout->addWidget(textIn, 8, 0, 1, 1);
 
        generateButton = new QPushButton(gridLayoutWidget);
        generateButton->setObjectName(QString::fromUtf8("generateButton"));
        generateButton->setFont(font2);
 
        gLayout->addWidget(generateButton, 13, 0, 1, 1);
 
        buttonBrowseIn = new QPushButton(gridLayoutWidget);
        buttonBrowseIn->setObjectName(QString::fromUtf8("buttonBrowseIn"));
        buttonBrowseIn->setFont(font2);
 
        gLayout->addWidget(buttonBrowseIn, 8, 1, 1, 1);
 
        cancelButton = new QPushButton(gridLayoutWidget);
        cancelButton->setObjectName(QString::fromUtf8("cancelButton"));
        cancelButton->setFont(font2);
 
        gLayout->addWidget(cancelButton, 13, 1, 1, 1);
 
        labelOut = new QLabel(gridLayoutWidget);
        labelOut->setObjectName(QString::fromUtf8("labelOut"));
        labelOut->setFont(font);
 
        gLayout->addWidget(labelOut, 10, 0, 1, 1);
 
        textOut = new QLineEdit(gridLayoutWidget);
        textOut->setObjectName(QString::fromUtf8("textOut"));
 
        gLayout->addWidget(textOut, 11, 0, 1, 1);
 
        buttonBrowseOut = new QPushButton(gridLayoutWidget);
        buttonBrowseOut->setObjectName(QString::fromUtf8("buttonBrowseOut"));
        buttonBrowseOut->setFont(font);
 
        gLayout->addWidget(buttonBrowseOut, 11, 1, 1, 1);
 
        horizontalSpacer = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
 
        gLayout->addItem(horizontalSpacer, 12, 0, 1, 1);
 
        horizontalSpacer_3 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
 
        gLayout->addItem(horizontalSpacer_3, 6, 0, 1, 1);
 
        horizontalSpacer_5 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
 
        gLayout->addItem(horizontalSpacer_5, 9, 0, 1, 1);
 
        horizontalSpacer_2 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
 
        gLayout->addItem(horizontalSpacer_2, 1, 0, 1, 1);
 
        hLayout1 = new QHBoxLayout();
        hLayout1->setSpacing(6);
        hLayout1->setObjectName(QString::fromUtf8("hLayout1"));
        lblCMD = new QLabel(gridLayoutWidget);
        lblCMD->setObjectName(QString::fromUtf8("lblCMD"));
 
        hLayout1->addWidget(lblCMD);
 
        horizontalSpacer_8 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
 
        hLayout1->addItem(horizontalSpacer_8);
 
        txtCMD1 = new QLineEdit(gridLayoutWidget);
        txtCMD1->setObjectName(QString::fromUtf8("txtCMD1"));
 
        hLayout1->addWidget(txtCMD1);
 
        horizontalSpacer_7 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
 
        hLayout1->addItem(horizontalSpacer_7);
 
        txtCMD2 = new QLineEdit(gridLayoutWidget);
        txtCMD2->setObjectName(QString::fromUtf8("txtCMD2"));
 
        hLayout1->addWidget(txtCMD2);
 
        horizontalSpacer_6 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
 
        hLayout1->addItem(horizontalSpacer_6);
 
        horizontalSpacer_4 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
 
        hLayout1->addItem(horizontalSpacer_4);
 
 
        gLayout->addLayout(hLayout1, 2, 0, 1, 1);
 
        hLayout2 = new QHBoxLayout();
        hLayout2->setSpacing(6);
        hLayout2->setObjectName(QString::fromUtf8("hLayout2"));
        lblUF = new QLabel(gridLayoutWidget);
        lblUF->setObjectName(QString::fromUtf8("lblUF"));
 
        hLayout2->addWidget(lblUF);
 
        txtUF1 = new QLineEdit(gridLayoutWidget);
        txtUF1->setObjectName(QString::fromUtf8("txtUF1"));
 
        hLayout2->addWidget(txtUF1);
 
        horizontalSpacer_11 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
 
        hLayout2->addItem(horizontalSpacer_11);
 
        txtUF2 = new QLineEdit(gridLayoutWidget);
        txtUF2->setObjectName(QString::fromUtf8("txtUF2"));
 
        hLayout2->addWidget(txtUF2);
 
        horizontalSpacer_12 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
 
        hLayout2->addItem(horizontalSpacer_12);
 
        txtUF3 = new QLineEdit(gridLayoutWidget);
        txtUF3->setObjectName(QString::fromUtf8("txtUF3"));
 
        hLayout2->addWidget(txtUF3);
 
        horizontalSpacer_9 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
 
        hLayout2->addItem(horizontalSpacer_9);
 
 
        gLayout->addLayout(hLayout2, 4, 0, 1, 1);
 
        hLayout3 = new QHBoxLayout();
        hLayout3->setSpacing(6);
        hLayout3->setObjectName(QString::fromUtf8("hLayout3"));
        lblUF2 = new QLabel(gridLayoutWidget);
        lblUF2->setObjectName(QString::fromUtf8("lblUF2"));
 
        hLayout3->addWidget(lblUF2);
 
        txtUF4 = new QLineEdit(gridLayoutWidget);
        txtUF4->setObjectName(QString::fromUtf8("txtUF4"));
 
        hLayout3->addWidget(txtUF4);
 
        horizontalSpacer_14 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
 
        hLayout3->addItem(horizontalSpacer_14);
 
        txtUF5 = new QLineEdit(gridLayoutWidget);
        txtUF5->setObjectName(QString::fromUtf8("txtUF5"));
 
        hLayout3->addWidget(txtUF5);
 
        horizontalSpacer_15 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
 
        hLayout3->addItem(horizontalSpacer_15);
 
        txtUF6 = new QLineEdit(gridLayoutWidget);
        txtUF6->setObjectName(QString::fromUtf8("txtUF6"));
 
        hLayout3->addWidget(txtUF6);
 
        horizontalSpacer_16 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
 
        hLayout3->addItem(horizontalSpacer_16);
 
 
        gLayout->addLayout(hLayout3, 5, 0, 1, 1);
 
        horizontalSpacer_10 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
 
        gLayout->addItem(horizontalSpacer_10, 3, 0, 1, 1);
 
        RumSelectorView->setCentralWidget(centralWidget);
        menuBar = new QMenuBar(RumSelectorView);
        menuBar->setObjectName(QString::fromUtf8("menuBar"));
        menuBar->setGeometry(QRect(0, 0, 581, 19));
        menuFichiers = new QMenu(menuBar);
        menuFichiers->setObjectName(QString::fromUtf8("menuFichiers"));
        menu = new QMenu(menuBar);
        menu->setObjectName(QString::fromUtf8("menu"));
        RumSelectorView->setMenuBar(menuBar);
        mainToolBar = new QToolBar(RumSelectorView);
        mainToolBar->setObjectName(QString::fromUtf8("mainToolBar"));
        RumSelectorView->addToolBar(Qt::TopToolBarArea, mainToolBar);
        statusBar = new QStatusBar(RumSelectorView);
        statusBar->setObjectName(QString::fromUtf8("statusBar"));
        RumSelectorView->setStatusBar(statusBar);
 
        menuBar->addAction(menuFichiers->menuAction());
        menuBar->addAction(menu->menuAction());
        menuFichiers->addAction(actionQuitter);
        menu->addAction(action_A_propos_de);
        menu->addAction(actionLicence);
 
        retranslateUi(RumSelectorView);
        QObject::connect(textIn, SIGNAL(editingFinished()), buttonBrowseIn, SLOT(click()));
        QObject::connect(textOut, SIGNAL(editingFinished()), buttonBrowseOut, SLOT(click()));
        QObject::connect(buttonBrowseOut, SIGNAL(clicked()), generateButton, SLOT(click()));
 
        QMetaObject::connectSlotsByName(RumSelectorView);
    } // setupUi
 
    void retranslateUi(QMainWindow *RumSelectorView)
    {
        RumSelectorView->setWindowTitle(QApplication::translate("RumSelectorView", "Rum Selector", 0, QApplication::UnicodeUTF8));
        action_A_propos_de->setText(QApplication::translate("RumSelectorView", "&A propos de...", 0, QApplication::UnicodeUTF8));
        actionQuitter->setText(QApplication::translate("RumSelectorView", "&Quitter", 0, QApplication::UnicodeUTF8));
        actionLicence->setText(QApplication::translate("RumSelectorView", "Licence", 0, QApplication::UnicodeUTF8));
        labelTitle->setText(QApplication::translate("RumSelectorView", "Rum Selector", 0, QApplication::UnicodeUTF8));
        labelIn->setText(QApplication::translate("RumSelectorView", "Nom du fichier \303\240 filtrer", 0, QApplication::UnicodeUTF8));
        generateButton->setText(QApplication::translate("RumSelectorView", "&G\303\251n\303\251rer", 0, QApplication::UnicodeUTF8));
        buttonBrowseIn->setText(QApplication::translate("RumSelectorView", "Parcourir", 0, QApplication::UnicodeUTF8));
        cancelButton->setText(QApplication::translate("RumSelectorView", "Annuler", 0, QApplication::UnicodeUTF8));
        labelOut->setText(QApplication::translate("RumSelectorView", "Nom du fichier cible", 0, QApplication::UnicodeUTF8));
        buttonBrowseOut->setText(QApplication::translate("RumSelectorView", "Parcourir", 0, QApplication::UnicodeUTF8));
        lblCMD->setText(QApplication::translate("RumSelectorView", "CMD", 0, QApplication::UnicodeUTF8));
        txtCMD1->setText(QApplication::translate("RumSelectorView", "14", 0, QApplication::UnicodeUTF8));
        txtCMD2->setText(QApplication::translate("RumSelectorView", "15", 0, QApplication::UnicodeUTF8));
        lblUF->setText(QApplication::translate("RumSelectorView", "UF   ", 0, QApplication::UnicodeUTF8));
        lblUF2->setText(QApplication::translate("RumSelectorView", "UF   ", 0, QApplication::UnicodeUTF8));
        menuFichiers->setTitle(QApplication::translate("RumSelectorView", "&Fichiers", 0, QApplication::UnicodeUTF8));
        menu->setTitle(QApplication::translate("RumSelectorView", "&?", 0, QApplication::UnicodeUTF8));
    } // retranslateUi
 
};
 
namespace Ui {
    class RumSelectorView: public Ui_RumSelectorView {};
} // namespace Ui
 
QT_END_NAMESPACE
 
#endif // UI_RUMSELECTORVIEW_H
Je suis sous Windows XP et j'utilise Qt Creator 4.5.1. J'ai déjà chercher un peu partout sur le web ainsi que dans ce site sans succès.

Merci de votre aide...