#include <QApplication>
#include <QPdfWriter>
#include <QPainter>
int main(int argc, char *argv[])
{
QPdfWriter pdfWriter("my.pdf");
quint32 iYPos = 10;
pxPic.load("/usr/local/SMART/public_html/images/logo.jpg", "JPG");
painter.drawPixmap(0, iYPos, pxPic.width(), pxPic.height(), pxPic);
iYPos += pxPic.height() + 250;
imgPic.load("/usr/local/SMART/public_html/images/logo.jpg", "JPG");
painter.drawImage(0, iYPos, imgPic, imgPic.width(), imgPic.height());
return 0;
}
#include <QApplication>
#include <QPdfWriter>
#include <QPainter>
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
QPdfWriter pdfWriter("my.pdf");
QPainter painter(&pdfWriter);
quint32 iYPos = 10;
QPixmap pxPic;
pxPic.load("/usr/local/SMART/public_html/images/logo.jpg", "JPG");
painter.drawPixmap(0, iYPos, pxPic.width(), pxPic.height(), pxPic);
iYPos += pxPic.height() + 250;
QImage imgPic;
imgPic.load("/usr/local/SMART/public_html/images/logo.jpg", "JPG");
painter.drawImage(0, iYPos, imgPic, imgPic.width(), imgPic.height());
return 0;
}
To copy to clipboard, switch view to plain text mode
Bookmarks