I have a very strange problem with QPixmap in Qt. I'm coding in C++ btw. Anyways the problem is, that as soon as I want to create a 9th QPixmap pointer in my main window class, the program crashes. so this works:
class MainWindow : public QMainWindow
{
Q_OBJECT
QPixmap *doorOpened, *doorClosed, *dirUp, *dirDown, *dirNone, *timePause, *timePlay, *timeStop;
//QPixmap *doorOpen;
public:
explicit MainWindow(QWidget *parent = 0);
~MainWindow();
private:
Ui::MainWindow *ui;
};
and this crashes:
class MainWindow : public QMainWindow
{
Q_OBJECT
QPixmap *doorOpened, *doorClosed, *dirUp, *dirDown, *dirNone, *timePause, *timePlay, *timeStop;
QPixmap *doorOpen;
public:
explicit MainWindow(QWidget *parent = 0);
~MainWindow();
private:
Ui::MainWindow *ui;
};
This stuff is partially done with the Qt Creator and window designer, as you might have guessed by the code.
So what am I doing wrong here that causes this strange behaviour?
Thanks in advance!