×

Discussion Board

Results 1 to 7 of 7
  1. #1
    Registered User
    Join Date
    Oct 2009
    Posts
    82

    Problem with QDeclarativeImageProvider

    I have an application that shows QPixmaps in QML using QDeclarativeImageProvider.

    On desktop it works fine, but on N9 I get messages like:
    QML Image: Failed to get image from provider: image://level/1
    and nothing is shown.

    Adding some debugging code I can see that my provider's requestPixmap() method is never even called on N9.

    Does this ring a bell? Has someone successfully used QDeclarativeImageProvider on N9 / Harmattan?
    Grego
    http://mpaja.com/

  2. #2
    Super Contributor
    Join Date
    Oct 2008
    Location
    INDIA
    Posts
    2,326

    Re: Problem with QDeclarativeImageProvider

    Compare your code with this code : QDeclarativeImageProvider on N9 / Harmattan

    Also read this blog : Using QDeclarativeImageProvider to load QPixmap to QML Image element

    regards,
    rahul

  3. #3
    Registered User
    Join Date
    Oct 2009
    Posts
    82

    Re: Problem with QDeclarativeImageProvider

    Quote Originally Posted by rahulvala View Post
    Well, the first example is hard to run as I can't find qmlviewer for N9 that would work with pr1.1.

    The blog code looks very much like what I have, and as I mentioned it works fine on desktop, but does not work on N9, not for me in any case.
    Grego
    http://mpaja.com/

  4. #4
    Registered User
    Join Date
    Oct 2009
    Posts
    82

    Re: Problem with QDeclarativeImageProvider

    It seems to work in Symbian as well, so I created a bug:

    https://bugreports.qt.nokia.com/browse/QTBUG-23134
    Grego
    http://mpaja.com/

  5. #5
    Super Contributor
    Join Date
    Mar 2009
    Posts
    1,024

    Re: Problem with QDeclarativeImageProvider

    I took a look at your code and I've seen you are using the harmattan booster.
    I think your code works if you comment out the CONFIG += qdeclarative-boostable line from your project file.

    Time ago I noticed this bug on harmattan.

    Basically if you use the booster, the viewer pointers points to an QDeclarativeView which is not the one used to display your content.
    So when you set the image provider, you set it to a wrong Declarative engine.

    The correct QDeclarative view pointer is a private member of the QML viewer class.

  6. #6
    Registered User
    Join Date
    Jul 2004
    Posts
    166

    Re: Problem with QDeclarativeImageProvider

    It woks fine for me on N9, I generally create my own QDeclaraviewView and call necessary method on it.
    http://kunalmaemo.blogspot.com/

  7. #7
    Registered User
    Join Date
    Oct 2009
    Posts
    82

    Re: Problem with QDeclarativeImageProvider

    Good catch. It seems to be variation of the problem described in https://bugreports.qt.nokia.com/brow...REATORBUG-6490
    So it is probably fixed in Qt Creator 2.4.0
    Grego
    http://mpaja.com/

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×