Hi guys, need help. I want to delete space between left edge and right edge equivalent, or be able to control it, thanks!
Real important things, I rewrite resizeEvent for my main QWidget instance (for change size of my QListWidget).


Qt Code:
  1. w.compListWidg->setIconSize(QSize(32,32));
  2. w.compListWidg->setViewMode(QListView::IconMode);
  3. w.compListWidg->setResizeMode(QListView::Adjust);
  4. w.compListWidg->setGridSize(QSize(100, 60));
  5.  
  6.  
  7. w.compList << inst1.getValueName() << inst2.getValueName() << inst3.getValueName() << inst4.getValueName()
  8. << inst5.getValueName() << inst6.getValueName() << inst7.getValueName() << inst8.getValueName();
  9.  
  10. foreach(QString nameItem, w.compList) {
  11. w.compItem = new QListWidgetItem(nameItem, w.compListWidg);
  12. w.compItem->setIcon(QPixmap(":/icon/icon.png"));
  13. w.compItem->setFlags(Qt::ItemIsEnabled | Qt::ItemIsSelectable);
  14. }
To copy to clipboard, switch view to plain text mode 

Qt.jpg