16,816
社区成员




void keyboard_line_edit::mousePressEvent(QMouseEvent *event)
{
keyboard kb(this);
connect(&kb, SIGNAL(outputSignal(QString)), &kb, SLOT(accept()));
connect(&kb, SIGNAL(exitKeyboard()), &kb, SLOT(reject()));
//kb.setGeometry(width()/8, height()/6, this->width()/4*3, this->height()/3*2);
kb.initKeyboard(keyboard::NUMERICAL_KEYBOARD, keyboard::NONE, QLineEdit::Normal);
kb.setKeyboardNotice(tr("参数设置"));
kb.setExitButtonVisible(true);
kb.setKeyboardLineEditText(this->text());
if(kb.exec() == QDialog::Accepted)
{// keyboard enter
this->setText(kb.get_keyboard_output());
}
}