table.js
来自「本文件是<精通QT4编程>的配套源代码」· JavaScript 代码 · 共 41 行
JS
41 行
function Table(ui)
{
this.ui = ui;
with (ui) {
btnClear.clicked.connect(this, tableWidget.clear);
btnInsRow.clicked.connect(this, "insertRow");
btnDelRow.clicked.connect(this, "deleteRow");
btnInsCol.clicked.connect(this, "insertCol");
btnDelCol.clicked.connect(this, "deleteCol");
}
}
Table.prototype.insertRow = function()
{
with (this.ui) {
tableWidget.insertRow(spinInsRow.value);
}
}
Table.prototype.deleteRow = function()
{
with (this.ui) {
tableWidget.removeRow(spinDelRow.value);
}
}
Table.prototype.insertCol = function()
{
with (this.ui) {
tableWidget.insertColumn(spinInsCol.value);
}
}
Table.prototype.deleteCol = function()
{
with (this.ui) {
tableWidget.removeColumn(spinDelCol.value);
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?