Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Apr 2008

    Unhappy save QPixmap asynchronously


    I use the following codes to save a QPixmap, while it does really saves, it actually makes my app pause a little, probably due the the amount of data to be written is large.

    Therefore, I would like to find out how can i save a image asynchronously such that my app will not "hang"?

                    QPixmap *aPicmap2=new QPixmap();
                    bool status1=aPicmap2->loadFromData(ba);
                    qDebug()<<"saving image....";
                    bool status2=aPicmap2->save("/home/user/MyDocs/DCIM/filename.png");
    Any help is appreciated. Thanks!

  2. #2
    Super Contributor
    Join Date
    Mar 2009

    Re: save QPixmap asynchronously

    You can put the code you want to run asynchronously in a new QObject sublcass and then run it in a separate thread as
    shown in the following example [1].

    [1] http://www.developer.nokia.com/Commu...ct_to_a_thread

Similar Threads

  1. Replies: 4
    Last Post: 2010-05-17, 16:15
  2. working asynchronously
    By kosjanne in forum Symbian
    Replies: 1
    Last Post: 2005-04-08, 13:28
  3. writing asynchronously to a file
    By nmnir in forum Symbian
    Replies: 0
    Last Post: 2004-10-21, 09:03
  4. send SMS asynchronously using the REQ_SMS_SEND ERROR
    By syzhangjs in forum Multimodecards
    Replies: 1
    Last Post: 2003-07-28, 14:41

Posting Permissions

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