Skip to content

Instantly share code, notes, and snippets.

@janisozaur
Created March 24, 2011 22:52
Show Gist options
  • Save janisozaur/886060 to your computer and use it in GitHub Desktop.
Save janisozaur/886060 to your computer and use it in GitHub Desktop.
obraz = new QGridLayout();
QImage *img = new QImage();
img->load(fName);
if( img->load(fName)) qDebug()<<"Udalo sie zaladowac obrazek.";
//img->scaled(imgSize,Qt::IgnoreAspectRatio, Qt::FastTransformation);
//img->scaledToHeight(imgSize.height(), Qt::FastTransformation);
//img->scaledToWidth(imgSize.width(), Qt::FastTransformation);
QLabel *l = new QLabel;
l->setPixmap(QPixmap::fromImage(*img));
obraz->addWidget(l);
//ui->frame->setLayout(obraz);
QWidget *w = new QWidget(this);
w->setLayout(obraz);
ui->scrollArea->setWidget(w);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment