Qt Code:
iconmodel->setQuery("SELECT `PictureForButtonMode` FROM `dictionary` WHERE `PictureForButtonMode` LIKE '%.%'"); while(iconmodel->query().next()) { 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); }To copy to clipboard, switch view to plain text mode
this code works without the foreach but im getting the first image for each item and its using the same image for all of them
what im trying to do is for each string assign the string filename to the item.... still cant get it working properly ...
Bookmarks