On Mon, Apr 15, 2019 at 4:52 PM Adam <a...@sympatico.ca> wrote: > Hello, > > I am trying to get the selected item inside a qTableView when I let it up > to a QtableView.clicked.connect() it is only returning a QModelIndex can't > find in the docs anything related to getting the text from that row/column. >
QTableView inherits from QAbstractView, and it entirely deals in QModelIndex, which is the common type to QAbstractModel . The clicked() signal emits with a QModelIndex: https://doc.qt.io/qt-5/qabstractitemview.html#clicked Converting to some type of item is specific to the model you are using. If you are using a QStandardItemModel, then you would need to convert the index to an item using QStandardItemModel.itemFromIndex() https://doc.qt.io/archives/qt-4.8/qstandarditemmodel.html#itemFromIndex Justin > - Adam > > -- > You received this message because you are subscribed to the Google Groups > "Python Programming for Autodesk Maya" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to python_inside_maya+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/python_inside_maya/cce1a31d-e861-4893-b091-0696cd661f0e%40googlegroups.com > <https://groups.google.com/d/msgid/python_inside_maya/cce1a31d-e861-4893-b091-0696cd661f0e%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group. To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA19nj-sL7xzN-fAxsbz%3Dbi6Xva0B_be3fZuROsWou4Whg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.