-
Notifications
You must be signed in to change notification settings - Fork 3
Flickr
guillaume charbonnier edited this page Mar 9, 2019
·
6 revisions

| 😅 (difficulty) | ⌛ (time-Box) | 🔗 (related to) |
|---|---|---|
| 2️⃣ / 5️⃣ | 30 - 60 mn | Multimedia |
Use the public flick'r feed to display pictures...
- Display an image knowing its url
- Create a model to retrieve images provided with flick'r service based on a criteria and display the provided image
- Add a textfield to define the requested tags
- Add a combobox to select the langage feed
- display meta data (publication date, credits,..)
- clicking on an image enlarge it with a nice animation
Warning : Spoilers !!!
| QML types | Module | Useful for... |
|---|---|---|
| XmlListModel | QtQuick.XmlListModel | A model specialized for xml source |
- XmlListModel is very handy when it comes to get rss data : simply set the url to its source property and defined the model role you would like to have as xpath.
XmlListModel operating with flick'r (if you really don't want to bother)
XmlListModel{
id:flickerModel
source: "http://api.flickr.com/services/feeds/photos_public.gne?format=rss2&tags=" + searchTag.text
onStatusChanged: {
if (status == XmlListModel.Error)
console.log(errorString())
}
query: "/rss/channel/item"
namespaceDeclarations: "declare namespace media=\"http://search.yahoo.com/mrss/\";"
XmlRole { name:"title"; query: "title/string()"}
XmlRole { name:"url"; query: "media:thumbnail/@url/string()"}
}- One can also use XMLHttpRequest (javascript object) to get data and for instance parse its result in json
N/A
- download image as full resolution but show a low res image until the full res image is not loaded
- upload a picture
- display the Qt YouTube channel (https://www.youtube.com/feeds/videos.xml?channel_id=UCBcRF18a7Qf58cCRy5xuWwQ)