[Qt-interest] save widget snapshot in file

Mystical Rose mca.meraj at gmail.com
Thu Aug 18 22:48:10 CEST 2011


Hi Brilliantov,

Let me know what do you mean by dynamic image?
Do you want to capture all the activities going on ?

Regards,
Meraj

On Thu, Aug 18, 2011 at 1:37 PM, Brilliantov Kirill Vladimirovich
<brilliantov at byterg.ru> wrote:
> Hello!
> I have to save snapshot from widget to file.
> My function:
>  void Image::make_snapshot()
> {
>        QString name =
> QDateTime::currentDateTime().toString(QString("yyyyMMddhhmmsszzz.jpg"));
>        QPixmap img = QPixmap::grabWidget(this);
>        if (!img.save(name))
>                QMessageBox::warning(this, QString("JPEG snapshot"),QString(tr("Can't
> save snapshot in file %1").arg(name)),QMessageBox::Ok);
> }
>
> This is function work with static image, but not work with dynamic.
>
> How can I solve this problem?
> Thank you and excuse me for my bad english.
>
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at qt.nokia.com
> http://lists.qt.nokia.com/mailman/listinfo/qt-interest
>



-- 
Meraj Ahmad Ansari
Senior S/W Engineer
Aricent Technologies Limited
Gurgaon , India



More information about the Qt-interest-old mailing list