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

  • Home
  • SEARCH
  • 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 8087011
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T18:37:58+00:00 2026-06-05T18:37:58+00:00

How can I save QML Image into phone memory ?? also if saving the

  • 0

How can I save QML Image into phone memory ??

also if saving the image was applicable , I have this case which I need to add some text to the image (we can imagine it as we have a transparent image[that hold the text] and put it over the second image , so finally we have one image that we can save it into phone 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-06-05T18:38:02+00:00Added an answer on June 5, 2026 at 6:38 pm

    Not from Image directly. QDeclarativeImage has pixmap, setPixmap and pixmapChange methods, but for some reason there is no property declared. So you cannot use it fom qml. Unfortunately it cannot be used from C++ either – it is a private calsss.

    What you can do is paint graphics item to your pixmap and save it to file.

    class Capturer : public QObject
    {
        Q_OBJECT
    public:
        explicit Capturer(QObject *parent = 0);
        Q_INVOKABLE void save(QDeclarativeItem *obj);
    };
    
    void Capturer::save(QDeclarativeItem *item)
    {
        QPixmap pix(item->width(), item->height());
        QPainter painter(&pix);
        QStyleOptionGraphicsItem option;
        item->paint(&painter, &option, NULL);
        pix.save("/path/to/output.png");
    }
    

    Register “capturer” context variable:

    int main()
    {
        // ...
        Capturer capturer;
        QmlApplicationViewer viewer;
        viewer.rootContext()->setContextProperty("capturer", &capturer);
        // ...
    }
    

    And use it in your qml:

    Rectangle {
        // ...
        Image {
            id: img
            source: "/path/to/your/source"
        }
        MouseArea {
            anchors.fill: parent
            onClicked: {
                capturer.save(img)
            }
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We have a part of our program which can save a diagnostic file for
in my windows application there is a image saving process.i can save different images.the
I have UITextField named textField where user can save phone number with NSUserDefaults .
I have an object caching class that can save an object in memory, the
i have a VSTO application(WPF) which can save an opened Excel File on a
I need a software which can save all the previous versions of a file,
I can save image to iPhone (iPhone Photo Albums \ Saved Photos) with UIImageWriteToSavedPhotosAlbum(image,
In my app, the user can save his input to disk. This is done
i have a list with some items.The use can save some of them in
i have a table in my mysql database named (names) now everyone can save

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.