Hello everyone,

i've written the following code:
Qt Code:
  1. img = new QImage("images/01_greyscale.png");
  2. QLabel *text1 = new QLabel(tr("..."));
  3. img_greyscale->setPixmap(QPixmap::fromImage(*img));
  4. img_greyscale->show();
  5.  
  6. QVBoxLayout *leftLayout = new QVBoxLayout;
  7. leftLayout->addWidget(text1);
  8.  
  9. setLayout(leftLayout);
  10. setWindowTitle(tr("Test"));
To copy to clipboard, switch view to plain text mode 

"img_greyscale" is defined in the header-file.
When starting the program with the "img_greyscale->setPixmap" line no Window pops up, nothing happens at all, not even an error is thrown. But i can't terminate the program so there must be a problem with this line.
What do i do wrong?

The "images" folder lies in the source-folder. The png-image weights only 8kb.


Thanks for your help.

Greetings,
moat