hey
I have created a class which inherits from QGroupBox. At first it worked well, but after editing some Code I get the following Compiler Error (sry, that it's german):
D:\Eigene Dateien\qt\Ablaufplan\aufgabe.h:56: Fehler: C2248: "QGroupBox::QGroupBox": Kein Zugriff auf private Member, dessen Deklaration in der QGroupBox-Klasse erfolgte.
d:\qt\5.3\msvc2012_opengl\include\qtwidgets\qgroup box.h(103): Siehe Deklaration von 'QGroupBox::QGroupBox'
d:\qt\5.3\msvc2012_opengl\include\qtwidgets\qgroup box.h(54): Siehe Deklaration von 'QGroupBox'
Diese Diagnose trat in der vom Compiler generierten Funktion "Aufgabe::Aufgabe(const Aufgabe &)" auf.
in qgroupbox.h(54) starts the definition of the Class and Line 103 contains the Marco Q_DISABLE_COPY(QGroupBox).
For me it looks like the Compiler generates a function, in which the Object will be copied, but thats not allow due to the macro
I have tried to run qmake and commented out all my Code, but it didn't help. I have no Idea how to solve the Problem and I don't know why the compiler wants to generate a new Constructor
I Use Qt5.3 on Windows, the MSVC2012 Compiler and Qt Creator
my actual Code:
aufgabe.h
#ifndef AUFGABE_H
#define AUFGABE_H
#include <QGroupBox>
#include <QVBoxLayout>
#include <QTextBrowser>
#include <QPushButton>
#include <QCheckBox>
#include <QDate>
#include <QCalendarWidget>
{
Q_OBJECT
public:
/*enum aufgabenBereich{
Fertigung,
Eventvorbereitung,
Dokumentation,
Sonstiges
};*/
explicit Aufgabe
(QWidget *parent
= 0);
~Aufgabe();
/*void changeStatus(int status);
...
void calenderResize(); //ändert die mindestgröße, solange der Kalender angezeigt wird.*/
};
#endif // AUFGABE_H
#ifndef AUFGABE_H
#define AUFGABE_H
#include <QGroupBox>
#include <QVBoxLayout>
#include <QTextBrowser>
#include <QPushButton>
#include <QCheckBox>
#include <QDate>
#include <QCalendarWidget>
class Aufgabe : public QGroupBox
{
Q_OBJECT
public:
/*enum aufgabenBereich{
Fertigung,
Eventvorbereitung,
Dokumentation,
Sonstiges
};*/
explicit Aufgabe(QWidget *parent = 0);
~Aufgabe();
/*void changeStatus(int status);
...
void calenderResize(); //ändert die mindestgröße, solange der Kalender angezeigt wird.*/
};
#endif // AUFGABE_H
To copy to clipboard, switch view to plain text mode
aufgabe.cpp
#include "aufgabe.h"
{
/*this->setMinimumSize(150,80);
deadline = new QDate();
...
setBackColor(); //einfärben*/
}
Aufgabe::~Aufgabe()
{
/*delete layout;
delete discription;
delete showCalender;
delete deadlineEdit;
delete deadline;
delete editable;
delete ready;*/
}
/*void Aufgabe::setText(const QString &text){
.....
}*/
#include "aufgabe.h"
Aufgabe::Aufgabe(QWidget* parent) : QGroupBox(parent)
{
/*this->setMinimumSize(150,80);
deadline = new QDate();
...
setBackColor(); //einfärben*/
}
Aufgabe::~Aufgabe()
{
/*delete layout;
delete discription;
delete showCalender;
delete deadlineEdit;
delete deadline;
delete editable;
delete ready;*/
}
/*void Aufgabe::setText(const QString &text){
.....
}*/
To copy to clipboard, switch view to plain text mode
Hope anybody can help me
Bookmarks