Edit table in pyqt using QAbstractTableModel

前端 未结 2 863
轮回少年
轮回少年 2021-01-02 11:56

I\'m trying to create an editable table in PyQt. Here\'s the code for just displaying the table:

import sys
from PyQt4 import QtGui, QtCore
from PyQt4.QtCore         


        
2条回答
  •  我在风中等你
    2021-01-02 12:51

    I've just found the solution, in the flags methods need to return the value QtCore.Qt.ItemIsEditable | QtCore.Qt.ItemIsEnabled | QtCore.Qt.ItemIsSelectable

提交回复
热议问题