[Interest] Custom Url in a QML ToolButton

Bruno Tezine bruno at tezine.com
Fri Oct 11 14:04:40 CEST 2013

How can I use a custom url to load an image in a Qml ToolButton?
The following code works for the Image Element, but not for the ToolButton:
import QtQuick 2.1

import QtQuick.Controls 1.0
     source: 'image://eimageprovider/5' //ok


     iconSource: 'image://eimageprovider/5' //does not work.
     //iconSource: 'data:image/png;base64,' +myCppObj.getData(); //does 
not work either. myCppObj.getData() returns a base64 QByteArray from a 
png file.
     iconSource: 'myhandler:///5' //does not work. Using my own 


Thank you.

More information about the Interest mailing list