문제

bb::cascades::Image m_image = Image(QUrl(appRoot +"default.png"));

If the file does not exist what m_image returns ??

도움이 되었습니까?

해결책

It should return null

One of the benefits of packaging an image with the application is that it allows the tool to verify the images and optimize them for the devices they are targeting. Because they are packaged with the application, it should be assumed that they are instantly available, and should never fail to load. If an incorrect name is provided when an asset is created, an null image is returned.

Image documentation

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top