kamlmish
1st December 2010, 06:24
Hi All
I have a function where I am able to browse through specified directory (that contain images)
/************************************************** *****************/
void FrameDisplay::BrowseAndShow()
{
QDir dir("/home/kamlesh/Gall/GALL/images");
dir.setFilter(QDir::Files);
window = new QWidget;
foreach( const QFileInfo& entry, dir.entryInfoList( QStringList()<< "*.png", QDir::Files) )
{
QString imgName = entry.fileName();
QGridLayout* grid = new QGridLayout;
QLabel* label = new QLabel(this);
label->setPixmap(QPixmap(imgName));
grid->addWidget(label);
window->setLayout(grid);
window->setGeometry(20,20,20,30);
window->show();
}
}
/************************************************** ****************/
I need a way to display the images in a treeview structure e.g
/****************************************/
image1 image2
filename filename
image3 image4
filename filename
/****************************************/
How should I go about it?
Attached is the application GALL.zip and the macos style pdf for reference
I have a function where I am able to browse through specified directory (that contain images)
/************************************************** *****************/
void FrameDisplay::BrowseAndShow()
{
QDir dir("/home/kamlesh/Gall/GALL/images");
dir.setFilter(QDir::Files);
window = new QWidget;
foreach( const QFileInfo& entry, dir.entryInfoList( QStringList()<< "*.png", QDir::Files) )
{
QString imgName = entry.fileName();
QGridLayout* grid = new QGridLayout;
QLabel* label = new QLabel(this);
label->setPixmap(QPixmap(imgName));
grid->addWidget(label);
window->setLayout(grid);
window->setGeometry(20,20,20,30);
window->show();
}
}
/************************************************** ****************/
I need a way to display the images in a treeview structure e.g
/****************************************/
image1 image2
filename filename
image3 image4
filename filename
/****************************************/
How should I go about it?
Attached is the application GALL.zip and the macos style pdf for reference