bonjour,
j'ai deux erreur
expected primary-expression before '->' token
expected primary-expression before ')' token
voila le code

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
#include "fenprincipale.h"
#include "ui_fenprincipale.h"
#include "ajout_departement.h"
#include "ui_ajout_departement.h"
#include <QMdiSubWindow>
 
fenPrincipale::fenPrincipale(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::fenPrincipale)
{
    ui->setupUi(this);
    QObject::connect(ui->actionAjouter_departement,SIGNAL(triggered()),this,SLOT(on_actionAjouter_departement_triggered()));
}
 
fenPrincipale::~fenPrincipale()
{
    delete ui;
}
 
void fenPrincipale::on_actionAjouter_departement_triggered()
{
    Ajout_departement aj;
    aj.show();
    Ajout_departement *m = new Ajout_departement;
 
    QMdiSubWindow *s = fenPrincipale->addSubWindow(m);//voila les 2 lignes qui posent des problemes
    setCentralWidget(fenPrincipale);
    s->showMaximized();
}
</code>
 
fenprincipale.h
<code type="cpp">
#ifndef FENPRINCIPALE_H
#define FENPRINCIPALE_H
 
#include <QMainWindow>
#include <QMdiArea>
namespace Ui {
    class fenPrincipale;
}
 
class fenPrincipale : public QMainWindow
{
    Q_OBJECT
 
public:
    explicit fenPrincipale(QWidget *parent = 0);
    ~fenPrincipale();
    QMdiArea fenPrinciple;
private:
    Ui::fenPrincipale *ui;
 
private slots:
    void on_actionAjouter_departement_triggered();
};
 
#endif // FENPRINCIPALE_H
s'il veut plait est-ce que vous pouvez m'aider
et me dire quel est le probleme