hallo anda_skoa,
ich muss dich jetzt noch mal nerven, ich habe irgendwie schon seit mehreren tagen eine denkblockade.
Ich habe hier noch mal ein stück code, ich weiß hierbei nicht, wie ich die klasse pars ( den kontruktor) aufrufen soll.
thx
Code:
// MapTest2.h
#include <QtGui>
typedef QMap<int, int> Mappe;
class MapTest2 : public QMainWindow
{
public:
MapTest2(QWidget *parent = 0);
Mappe map;
};
Code:
// MapTest2.cpp
#include <QtGui>
#include "maptest2.h"
MapTest2::MapTest2(QWidget *parent)
{
map.insert(1,1);
map.insert(2,2);
map.insert(3,3);
qDebug(">>> First: %d", map.count() );
}
Code:
//Pars.h
#include <QtGui>
#include "maptest2.h"
class Pars: public MapTest2
{
public:
Pars();
MapTest2 mt;
};
Code:
//Pars.cpp
#include <QtGui>
#include "pars.h"
Pars::Pars()
{
qDebug(">>> Second: %d", mt.map.count() );
}
Lesezeichen