
Originally Posted by
filmfreak
Is this line in the init() function not the same thing as initializing it?
*Pixmap1 = QPixmap::fromMimeSource("ulquarter4.jpg");
No, because you first dereference that pointer. You need something like this:
Pixmap1
= new QPixmap();
// initialize Pixmap1 and make it point to a null pixmap*Pixmap1
= QPixmap::fromMimeSource("ulquarter4.jpg");
// fill that null pixmap with new data
Pixmap1 = new QPixmap(); // initialize Pixmap1 and make it point to a null pixmap
*Pixmap1 = QPixmap::fromMimeSource("ulquarter4.jpg"); // fill that null pixmap with new data
To copy to clipboard, switch view to plain text mode
Although it will be much easier, if you just use QPixmap instead of QPixmap *.
Please note that I am new to Qt Designer...I've been using it for only a few days now.
It has nothing to do with Qt Designer or ever Qt itself --- it's C++ issue.
Bookmarks