Load and show image info

This commit is contained in:
2019-09-01 16:04:45 +02:00
parent f0e4923a68
commit 310efce14e
8 changed files with 94 additions and 7 deletions
+24
View File
@@ -0,0 +1,24 @@
#include "imageinfo.h"
ImageInfo::ImageInfo(QWidget *parent) : QTreeWidget(parent)
{
setColumnCount(2);
setHeaderLabels({tr("Property"), tr("Value")});
}
void ImageInfo::setInfo(ImageInfoData info)
{
clear();
QList<QTreeWidgetItem*> items;
QTreeWidgetItem *w;
int i=0;
for(StringPair item : info)
{
w = new QTreeWidgetItem({item.first, item.second});
w->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled);
items.append(w);
i++;
}
insertTopLevelItems(0, items);
}