What is the true path for file?



I am using Qt5 on Raspberry Pi. I want to set a background-image for label and I am writing barcodeLabel->setStyleSheet("background:none; background-image: Url('/home/image.gif'); "); But image can’t show. What is the true local path for image file?

Note : I don’t use resource file.


Gif support may not be included in your Qt build. Try with jpeg or png files too.

You should also check Qt plugin mechanism, you need to copy cross-compiled plugins to your board.

An easy way to debug Qt plugin loading problems, use QT_DEBUG_PLUGINS=1 environment variable when starting your program. If you see any loading errors, you need to copy required files first.