Able to add image file in Qt Design, but image not visible at runtime. Bug?
-
Hi,
Might be a silly question but are you sure your .qrc file is compiled ?
-
Hi @jsulm , I tried disabling McAfee, the "Add Resource" option still freezes. The bug tracker does not seem to show this bug.
@SGaist , are you refering to "Clean project, Run Qmake, Run project" in QT Creator? If yes, I have already tried it. Or do you mean compile qrc via command prompt? How do I select "Add Resource" in command prompt?
I remember the "Add Resource" working, not freezing up 4 days ago when I first installed QT. I did not install anything new nor did any settings since then.
-
I ran that project on an Ubuntu 18.04 system using Qt 5.12.0
With no modifications, the application built and ran but the wrench was not visible.
In designer mode, the path to the wrench was to my disk - i.e. /home/joem/SG_GU16/Img/Wrench.png.
I changed it to point to the resource entry ":/Res/Img/Wrench.png" in the QLabel/pixmap tab for label_2.
Clean/qmake/rebuild/run and the wrench appears. -
@mranger90 , may I ask how do you change the path in Designer mode?
I only see the path
"C:\Users\HG\Doucments\Qt\SG_GUI16\Img\Wrench.png"
when I mouseover the "wrench.png" in the pixmap tab.
Did you select "Choose Resource" or "Choose file"?
I selected "Choose file". When I select "Choose Resource" the program freezes like it is looking for something, I need to press ESC to unfreeze it.
-
Hi
Its not the project it self as it seems to work with same compiler and Qt version.
Have not heard it freezing before when trying to open the resource browse window.
very odd.