Since you don't bother to tell us what the error messages are, how are we supposed to give you any help?
I will point out at least one other serious error in your code: The constructor for your "Levels" calss is wrong and should be:
{
}
Levels::Levels( QWidget * parent )
: QMainWindow( parent )
{
}
To copy to clipboard, switch view to plain text mode
In addition, the "bilder" variable is defined incorrectly. It should be QList<QString>, not QList<QString *>. This will cause compiler errors in the "setzeBilder" function because QString::fromStdString() returns a QString, not a QString *.
And why does your "erzeugen()" method have a Levels * argument that is never used? Looks to me like you don't understand how to create and initialize a QWidget-based class. Everything that you are doing in these two extra methods should be called from your class constructor, not externally, like this:
{
setzeBilder();
erzeugen(); // Note, "Levels *" argument is unnecessary and is removed.
}
Levels::Levels( QWidget * parent )
: QMainWindow( parent )
{
setzeBilder();
erzeugen(); // Note, "Levels *" argument is unnecessary and is removed.
}
To copy to clipboard, switch view to plain text mode
And there are probably 6 or 7 more serious errors and memory leaks in your code as well which I will let you discover on your own.
Is there a way to set the list at the class where this class is called?
I have no idea what this question means.
Bookmarks