PDA

View Full Version : Help with opening many pictures



philipp1
13th October 2006, 08:52
I have such code (Qt):
Window::Window(QWidget *parent, const char *name)
: QScrollView(parent, name)
{
pwgt=new QWidget(this);
this->addChild(pwgt);
}

void Window::openImage()
{
QString str=QFileDialog::getOpenFileName("","*.bmp");
QPixmap pix(str);
pwgt->resize(pix.width(),pix.height());
pwgt->setBackgroundPixmap(pix);
}

it opens some picture. I want to open many pictures in one Window so as they open near each other and I could see them all. And this pictures must be in some order like table or in one line.
May be I must use QHbox? (I read doc, but I dont know how to do it:confused: )

e8johan
13th October 2006, 09:10
You can always put them in a listwidget.

philipp1
13th October 2006, 09:14
Qt 3. I dont see such class as QListWidget.

jacek
14th October 2006, 00:13
Qt 3. I dont see such class as QListWidget.
Try QListView then.