iconmodel->setQuery("SELECT `PictureForButtonMode` FROM `dictionary` WHERE `PictureForButtonMode` LIKE '%.%'");
while(iconmodel->query().next())
{
QString buttonFV
= iconmodel
->query
().
value(0).
toString();
// = String = image file name
foreach(...) // is this possible ?
{
// The code below works when not in this foreach statement
bttnPath = "/home/dev/ttm/directory/icon/" + buttonFV;
stylesheet += "QListView { show-decoration-selected: 0; border:transparent; color: white; background: transparent ; }";
stylesheet += "QListView::text { padding-right: 300px; }";
stylesheet += "QListView::item {image: url(" +bttnPath + "); width: 135px; height: 207px; }";
iListView->setStyleSheet(stylesheet);
}