📄 gotolinedlg.cpp
字号:
#include "gotolinedlg.h"#include <qpushbutton.h>#include <qlayout.h>#include <qhbox.h>#include <qlabel.h>#include <qvalidator.h>GotoLineDlg::GotoLineDlg(QWidget *parent, const char *name) : QDialog(parent, name){ QVBoxLayout *vbox = new QVBoxLayout(this); vbox->setSpacing(5); QHBox *hbox = new QHBox(this); hbox->setMaximumWidth(200); m_editLineNum = new QLineEdit(this); QIntValidator *iv = new QIntValidator(m_editLineNum); m_editLineNum->setValidator(iv); vbox->addWidget(m_editLineNum); QPushButton *ok = new QPushButton("OK", hbox); ok->setDefault(true); QPushButton *cancel = new QPushButton("Cancel", hbox); QObject::connect(ok, SIGNAL(clicked()), this, SLOT(verify())); QObject::connect(cancel, SIGNAL(clicked()), this, SLOT(reject())); vbox->addWidget(hbox); setCaption("Goto Line");}int GotoLineDlg::exec(){ return QDialog::exec();}void GotoLineDlg::verify(){ accept();}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -