Skip to content
QtWS25 Last Chance
  • How do I make a QTableView readonly?

    Solved General and Desktop table view readonly
    7
    0 Votes
    7 Posts
    894 Views
    JonBJ
    @jdent said in How do I make a QTableView readonly?: @Christian-Ehrlicher sorry did not find any info on ItemFlags for QTableView In Qt's model-view paradigm the flags are returned by the model: Qt::ItemFlags QAbstractItemModel::flags(const QModelIndex &index) const, values flags Qt::ItemFlags. Qt::ItemIsEditable determines whether the model tells the view items are editable or not. A view like QTableView will call this, behind the scenes without you doing anything, and make its interface correspond to what the model wants. @mpergand's implementation does not return Qt::ItemIsEditable so items won't be editable. QTreeView will show items as non-editable.
  • 0 Votes
    2 Posts
    274 Views
    SGaistS
    Hi and welcome to devnet, Several users on this forum are successfully using QSerialPort to communicate with Arduino boards so it should be a good solution. Can you share the code you use ?
  • 0 Votes
    5 Posts
    8k Views
    kshegunovK
    @mcleary When one declares a property with MEMBER feature the QMetaProperty is reporting that the property is writable. This is quite strange indeed. I solve my problem removing the MEMBER declaration! This is certainly a possibility. Still I'm glad it's working for you,