← Back to team overview

ubuntu-sdk-bugs team mailing list archive

[Bug 1556757] Re: optionselector does not display image correctly

 

If I change it to qrc://images/icon2.jpg, I will have the follow errors:

QML debugging is enabled. Only use this in a safe environment.
file:///usr/ubuntu-sdk-dev/qml/Ubuntu/Components/1.3/OptionSelectorDelegate.qml:297:9: QML QQuickImage: Request for opening non-local file qrc://images/icon2.jpg
file:///usr/ubuntu-sdk-dev/qml/Ubuntu/Components/1.3/OptionSelectorDelegate.qml:297:9: QML QQuickImage: Request for opening non-local file qrc://images/icon2.jpg
file:///usr/ubuntu-sdk-dev/qml/Ubuntu/Components/1.3/OptionSelectorDelegate.qml:297:9: QML QQuickImage: Request for opening non-local file qrc://images/icon2.jpg
file:///usr/ubuntu-sdk-dev/qml/Ubuntu/Components/1.3/OptionSelectorDelegate.qml:297:9: QML QQuickImage: Request for opening non-local file qrc://images/icon2.jpg

The usage for [image: "images/icon2.jpg"] should be right since it does
not complain anything about it.

Best regards,
XiaoGuo

** Changed in: ubuntu-ui-toolkit (Ubuntu)
       Status: Invalid => New

-- 
You received this bug notification because you are a member of Ubuntu
SDK bug tracking, which is subscribed to ubuntu-ui-toolkit in Ubuntu.
https://bugs.launchpad.net/bugs/1556757

Title:
  optionselector does not display image correctly

Status in ubuntu-ui-toolkit package in Ubuntu:
  New

Bug description:
  I have developed a sample code at
  https://developer.ubuntu.com/api/apps/qml/sdk-15.04.1/Ubuntu.Components.OptionSelector/.
  My example code is at:

  https://github.com/liu-xiao-guo/optionselector

  The following part of the code has problems:

                  Component {
                      id: selectorDelegate
                      OptionSelectorDelegate { text: name; subText: description;
                          iconSource: {
                              return Qt.resolvedUrl(image)
                          }
                      }
                  }
                  ListModel {
                      id: customModel
                      ListElement { name: "Name 1"; description: "Description 1"; image: "images/icon2.jpg" }
                      ListElement { name: "Name 2"; description: "Description 2"; image: "images/icon2.jpg" }
                      ListElement { name: "Name 3"; description: "Description 3"; image: "images/icon2.jpg" }
                      ListElement { name: "Name 4"; description: "Description 4"; image: "images/icon2.jpg" }
                  }

  The images are defined in the qrc files. However, when I run the app,
  the image is shown as black. Attached please find the captured
  picture.

  Thanks & best regards,
  XiaoGuo

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ubuntu-ui-toolkit/+bug/1556757/+subscriptions


References