[Solved] Images in qt application not loading.
-
I was running into a problem and it was as simple as running qmake and then re-building, and then viola it worked. I used
@
QFile testIt(":/images/mypict.jpg")
qDebug() << "Are you loading?: " << testIt.exists();
@to verify that the image was NOT loading, but I didn't know why. I searched around for answers but didn't find one that said When you add a resource, you need to re-run qmake.
I'm posting this in case someone else has the same problem.
-
I was running into a problem and it was as simple as running qmake and then re-building, and then viola it worked. I used
@
QFile testIt(":/images/mypict.jpg")
qDebug() << "Are you loading?: " << testIt.exists();
@to verify that the image was NOT loading, but I didn't know why. I searched around for answers but didn't find one that said When you add a resource, you need to re-run qmake.
I'm posting this in case someone else has the same problem.