代码拉取完成,页面将自动刷新
#include "towercranelineedit.h"
TowerCraneLineEdit::TowerCraneLineEdit(QWidget *parent)
:QLineEdit(parent)
{
// m_BigLineEdit = new BigLineEdit;
// m_BigLineEdit->hide();
m_Alias.clear();
setReadOnly(true);
m_InputDig = new InputScreen;
connect(m_InputDig,SIGNAL(InputComplete(QString)),this,SLOT(SetInfoToLine(QString)));
connect(this,SIGNAL(returnPressed()),this,SLOT(ProcessEditFinisher()));
// connect(m_BigLineEdit,SIGNAL(returnPressed()),this,SLOT(ReadData()));
}
void TowerCraneLineEdit::SetAlias(QString Alias)
{
m_Alias = Alias;
}
void TowerCraneLineEdit::ProcessEditFinisher()
{
emit EditingFinished(this);
}
void TowerCraneLineEdit::SetInfoToLine(QString S)
{
clear();
setText(S);
emit returnPressed();
m_InputDig->Hide();
}
void TowerCraneLineEdit::mousePressEvent(QMouseEvent *e)
{
m_InputDig->SetShowLabel(m_Alias);
m_InputDig->show();
}
#if 0
void TowerCraneLineEdit::ReadData()
{
this->setText(m_BigLineEdit->GetData());
//m_BigLineEdit->hide();
//returnPressed();
emit EditingFinished(this);
}
void TowerCraneLineEdit::mousePressEvent(QMouseEvent *e)
{
if(e->button() == Qt::LeftButton)
{
emit Clicked();
QLineEdit::mousePressEvent(e);
QTimer::singleShot(0, this, &QLineEdit::selectAll);
m_BigLineEdit->SetText(this->text());
m_BigLineEdit->SetType(this->inputMethodHints());
m_BigLineEdit->show();
}
}
#endif
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。