Important: Please read the Qt Code of Conduct -

can't emit signal in QItemDelegate::setModelData....because this func is const....

  • This post is deleted!

  • @opengpu2

    When you create the signal in tableEditDelegate make sure its a const e.g

    void currentIndex(const QModelIndex &index) const;

    then you can connect it in the constructor for e.g

    connect(this, SIGNAL(currentIndex(QModelIndex)),SLOT(setCurrentIndex(QModelIndex)),Qt::DirectConnection);

Log in to reply