The written Qt program runs on another computer, and the background becomes white. My computer is win7 and my friend is win10. Initially I thought it was a system incompatibility problem. Later I found out that I was thinking too much. Use this title (cross-system display) to indicate execution on different computers.
solve:
Resources such as pictures or videos used in QT are best saved inProject resource directory,userelative path, My problem is that the absolute path is used (the background image is not in the resource path)
Path problem:
Use the relative path: /main/login, login is another name.
For example:
another example:
Add resources:
The way to add the resource path is to take the screenshot above as an example, right-click fancydemo.qrc->Open in Editor, and then click Add Files on the following screen that appears, and you can add aliases for easy calling