examples/declarative/cppextensions/imageprovider/imageprovider-example.qml
changeset 33 3e2da88830cd
parent 30 5dc02b23752f
equal deleted inserted replaced
30:5dc02b23752f 33:3e2da88830cd
    35 ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
    35 ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
    36 ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
    36 ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
    37 ** $QT_END_LICENSE$
    37 ** $QT_END_LICENSE$
    38 **
    38 **
    39 ****************************************************************************/
    39 ****************************************************************************/
       
    40 import Qt 4.7
       
    41 import "ImageProviderCore" // import the plugin that registers the color image provider
    40 
    42 
    41 import Qt 4.7
       
    42 import "ImageProviderCore"
       
    43 //![0]
    43 //![0]
    44 ListView {
    44 Column {
    45     width: 100; height: 100
    45     Image { source: "image://colors/yellow" }
    46     anchors.fill: parent
    46     Image { source: "image://colors/red" }
    47 
       
    48     model: myModel
       
    49 
       
    50     delegate: Component {
       
    51         Item {
       
    52             width: 100
       
    53             height: 50
       
    54             Text {
       
    55                 text: "Loading..."
       
    56                 anchors.centerIn: parent
       
    57             }
       
    58             Image {
       
    59                 source: modelData
       
    60                 sourceSize: "50x25"
       
    61             }
       
    62         }
       
    63     }
       
    64 }
    47 }
    65 //![0]
    48 //![0]
       
    49