1 Star 0 Fork 0

qinxude/rk3568ui

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
towercranelineedit.cpp 1.44 KB
一键复制 编辑 原始数据 按行查看 历史
qinxude 提交于 2024-09-03 09:38 . 3568ui base
#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
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C++
1
https://gitee.com/qinxude/rk3568ui.git
[email protected]:qinxude/rk3568ui.git
qinxude
rk3568ui
rk3568ui
master

搜索帮助