Proxmark3 community

Research, development and trades concerning the powerful Proxmark3 device.

Remember; sharing is caring. Bring something back to the community.


"Learn the tools of the trade the hard way." +Fravia

You are not logged in.

Announcement

Time changes and with it the technology
Proxmark3 @ discord

Users of this forum, please be aware that information stored on this site is not private.

#1 2009-09-03 23:18:57

adam@algroup.co.uk
Contributor
From: UK
Registered: 2009-05-01
Posts: 203
Website

QT programming

I'm trying to add functionality to the plot window to enable quick and easy saving of plots to a graphic file.... In theory, this should be fairly simple, but my QT foo is not strong and I find their documentation completely incomprehensible...

Right now, I'm just trying to save to png format:

                case Qt::Key_S:
                        fileName= QFileDialog::getSaveFileName(this, tr("Save Screenshot"), "proxmark3.png", tr("Images (*.png *.xpm *.jpg);;All Files (*)"));
                        if ( !fileName.isEmpty() ) {
                                picture.save(fileName,"png");
                        }
                        break;

The file select dialogue works great,  but when I hit 'save' I get this:

QPictureIO::write: No such picture format handler: png
QPicture::save: No such picture format: png

Anyone know how I add a .png handler?

Offline

#2 2009-09-09 11:03:55

rconty
Member
Registered: 2009-06-15
Posts: 7

Re: QT programming

Hey Adam,

PNG support should be enabled at compile. But according to:
http://qt.nokia.com/doc/4.5/qimagewrite … ageFormats
PNG file format should be available as default.

Which platform do you use ? How do you install Qt ?

BTW, you should remove file format "png" from picture.save() because as you allow user to put a name with a different extension (*.png *.xpm *.jpg), you must not force PNG file format.

Hope it helps.

Offline

Board footer

Powered by FluxBB