… = Picture[…] (gb.qt4)
Dim hPicture
As Picture
hPicture
= Picture
[ Path As String [ , Size As String ] ]
从内部图片缓存中返回一个
Picture对象。
如果图片目前不再缓存中,它会被从指定的文件自动加载。
如果用
"icon:/"
作为
Path 的开始,那么意味着想获取一个库存图标。
路径没有
"icon:/"
前缀的
Stock 类数组存取器获取该图标,并作为结果返回。
If the system is using a dark theme then the image is converted using Image.
Invert(True)
Examples
' 在按钮里放置一个标准的"关闭"图标
MyButton.Picture = Picture["icon:/16/close"]
' Put a custom "close" picture inside a button and resize it to stock size medium
MyButton.Picture = Picture["./IncludedIcons/close.png", "medium"]