Details
-
Bug
-
Resolution: Incomplete
-
Not Evaluated
-
None
-
5.14.0
-
None
-
Desktop Qt 5.14.0 MSVC2017 32bit
Description
整个项目是准备演示tablewidget中选中一行,按del 按钮进行删除。通过del的槽函数获取表中选中的行,进行删除。
首先我们把QTableWidget中selectionBehavior设置为SelectRow,运行程序,一切正常。
English:
The function of the whole project is to select a row of data in the table and press the Del button to delete it. The specific process is: bind the Del button to the signal, and delete the selected data in the table in the slot function. However, when the seletcionBehavior in the QTableWidget attribute is set to SingleSelect, we select a row and press the Del button, which will delete all the data in the whole table.Focus on the slot function of the Del button and the seletcionBehavior property.If you have any help, please contact me by email:744801871@qq.com