⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 table.js

📁 本文件是<精通QT4编程>的配套源代码
💻 JS
字号:
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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -