Details
-
Bug
-
Resolution: Invalid
-
Not Evaluated
-
None
-
5.3.1
-
None
-
Windows using the latest Qt Creator package from the site.
Arch Linux using Qt 5.3.1-1 and Qtcreator 3.2.0-1
Description
In the global scope of an application, the following code acts different on windows and linux:
QImage RedCircleImage(":/images/test1.png");
(The file is added as a resource and is being compiled into the executable successfully)
On windows, this works fine and the image is loaded. On linux, the file is not loaded and everything set to display the image is blank.
Fix for linux is to move it into open function like so;
MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow)
{
ui->setupUi(this);
QImage RedCircleImage(":/images/test1.png");
}