bonjour,
j'essaye de faire un pointeur faire une structure, mais je n'y arrive pas.
voici mon entete :
et voici le code ou j'essaye de manipuler la structure :
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 #ifndef MDICHILD_H #define MDICHILD_H #include <QWidget> class mdiChild : public QWidget { Q_OBJECT Q_ENUMS( Type ) public: enum Type { iAll = 0x0, iText = 0x1, iSQL = 0x2, iBrowser = 0x4, }; Q_DECLARE_FLAGS( Types, Type ) // child info structure struct childInfos { QString title; // the string to show as caption mdiChild::Types Type; // the plugin type ( can be or-ded }; mdiChild(QWidget* parent); ~mdiChild(); //typedef struct childInfos *info; struct childInfos *info; }; #endif // MDICHILD_H
est ce que quelqu'un peux m'expliquer comme faire ?
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12 #include "mdiChild.h" mdiChild::mdiChild(QWidget* parent):QWidget( parent ) { //struct childInfos info; info->title = "test"; //info->Type = mdiChild::iText; } mdiChild::~mdiChild() { }
merci
Partager