Qt Code:
  1. iconmodel = new QSqlQueryModel();
  2. iconmodel->setQuery("SELECT `PictureForButtonMode` FROM `dictionary` WHERE `PictureForButtonMode` LIKE '%.%'");
  3.  
  4. while(iconmodel->query().next())
  5. {
  6. QString buttonFV = iconmodel->query().value(0).toString();
  7.  
  8. QString bttnPath = QApplication::applicationDirPath();
  9. bttnPath = "/home/dev/ttm/directory/icon/" + buttonFV;
  10.  
  11.  
  12. // HERE IS WHERE I NEED TO TAKE buttonFV and make it into an icon i already
  13. // have it getting the string i just need to set it to a icon maybe how to set it in stylesheet ?
  14.  
  15. }
  16.  
  17.  
  18.  
  19. }
  20.  
  21. if(!db.open()){
  22. qDebug() << db.lastError();
  23. }
To copy to clipboard, switch view to plain text mode 

I need to set the icon from my query if i could use my dir location + my string in a stylesheet that would be awesome or if theres another work around please let me know