Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7416549
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T07:31:09+00:00 2026-05-29T07:31:09+00:00

I have a QML Flickable with 3 QML image elements that cycle through 8

  • 0

I have a QML Flickable with 3 QML image elements that cycle through 8 image files. My problem is that this uses a lot of memory on a Symbian device with very little. So when someone minimizes the app there isn’t a lot of memory left for other apps. I want to know what function I can use on the focus lost event to release the cache. Otherwise Symbian closes my app when the phone runs out of memory.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T07:31:10+00:00Added an answer on May 29, 2026 at 7:31 am

    I just ran into a very similar situation (literally). Apparently the QML cache is hardcoded deep inside the Qt source. I found a relevant posting at http://lists.qt.nokia.com/pipermail/qt-qml/2011-June/002743.html.

    Unfortunately, a solution deriving from that link requires modifying your Qt build. I don’t know if that’s appropriate for your situation.

    My current thinking is that the four constants defined at the top of src/declarative/util/qdeclarativepixmapcache.cpp file (lines 66-69, referenced from the above link) control when and why the QML image cache is modified. I’m setting the CACHE_EXPIRE_TIME constant to 0, as further logic inside that file indicates that with the constant set to 0, items in the cache expire immediately, and will therefore be removed. I’ll update this answer as things develop.

    Edit:

    My proposed solution did work. In the QDeclarativePixmapCache.cpp file, change line 68 from

    #define CACHE_EXPIRE_TIME 30
    

    to

    #define CACHE_EXPIRE_TIME 0
    

    Rebuild Qt and your application, and images will not be cached (or at least, the behavior I’m seeing would indicate that images are no longer being cached). There are a couple of downsides to this solution:

    1. Requires modification to Qt source tree
    2. Unknown performance hit to the overall application – not an issue for me but something to consider.

    This solution worked with Qt version 4.7. Good luck!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Problem background: I have a Qt/QML Symbian application targeting Qt 4.7.4, that requires a
I have a widget specified through a QML file. This widget contains a top
I want to try using QML ShaderEffectItem on QGraphicsView I have cloned files from
Have a photography site that I want to prevent image copying from. How can
Have some dates in my local Oracle 11g database that are in this format:
I have a QML based application in Qt that generates some warnings at runtime:
Hello I have the following simple QML app: import QtQuick 1.0 import com.nokia.symbian 1.0
I have two custom QML elements for audio, one for playing music (and extends
I am new to QML. As I understand, all elements have an associated width
This question has been edited: I am working with QML. I have a custom

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.