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

📄 gotocelldialog.java

📁 QT4 gui programming的随书光盘
💻 JAVA
字号:
import com.trolltech.qt.core.*;import com.trolltech.qt.gui.*;public class GoToCellDialog extends QDialog {    private Ui_GoToCellDialogClass ui = new Ui_GoToCellDialogClass();    public GoToCellDialog(QWidget parent) {        super(parent);        ui.setupUi(this);        ui.okButton.setEnabled(false);        QRegExp regExp = new QRegExp("[A-Za-z][1-9][0-9]{0,2}");        ui.lineEdit.setValidator(new QRegExpValidator(regExp, this));        ui.okButton.clicked.connect(this, "accept()");        ui.cancelButton.clicked.connect(this, "reject()");    }    private void on_lineEdit_textChanged(String text) {        ui.okButton.setEnabled(!text.isEmpty());    }    public static void main(String[] args) {        QApplication.initialize(args);        GoToCellDialog testGoToCellDialog = new GoToCellDialog(null);        testGoToCellDialog.show();        QApplication.exec();    }}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -