Hello everyone,
i've written the following code:
img
= new QImage("images/01_greyscale.png");
img_greyscale
->setPixmap
(QPixmap::fromImage(*img
));
img_greyscale->show();
leftLayout->addWidget(text1);
setLayout(leftLayout);
setWindowTitle(tr("Test"));
img = new QImage("images/01_greyscale.png");
QLabel *text1 = new QLabel(tr("..."));
img_greyscale->setPixmap(QPixmap::fromImage(*img));
img_greyscale->show();
QVBoxLayout *leftLayout = new QVBoxLayout;
leftLayout->addWidget(text1);
setLayout(leftLayout);
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
Bookmarks