Guest User

Untitled

a guest
Jul 20th, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. QWidget* CustomItemDelegate::createEditor(QWidget* parent, const QStyleOptionViewItem &option, const QModelIndex &index) const
  2. {
  3. QStyleOptionViewItemV4 opt = option;
  4. initStyleOption(&opt,index);
  5.  
  6. Q_ASSERT(index.model());
  7.  
  8. QStringList sentToList = index.data(Qt::EditRole).toStringList();
  9.  
  10. QString fileLabel = index.data(Qt::DisplayRole).toString();
  11.  
  12. if (!sentToList.empty()) {
  13. SentToDialog* sentToDialog = new SentToDialog(sentToList, fileLabel);
  14. sentToDialog->exec();
  15. }
  16. return 0;
  17. }
Add Comment
Please, Sign In to add comment