代码拉取完成,页面将自动刷新
同步操作将从 sj0830/qt_project 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
#include "frminputbox.h"
#include "ui_frminputbox.h"
#include "myhelper.h"
#include "iconhelper.h"
#include "myapp.h"
#pragma execution_character_set("utf-8")
frmInputBox::frmInputBox(QWidget *parent) :
QDialog(parent),
ui(new Ui::frmInputBox)
{
ui->setupUi(this);
this->InitStyle();
}
frmInputBox::~frmInputBox()
{
delete ui;
}
void frmInputBox::mouseMoveEvent(QMouseEvent *e)
{
if (mousePressed && (e->buttons() && Qt::LeftButton)) {
this->move(e->globalPos() - mousePoint);
e->accept();
}
}
void frmInputBox::mousePressEvent(QMouseEvent *e)
{
if (e->button() == Qt::LeftButton) {
mousePressed = true;
mousePoint = e->globalPos() - this->pos();
e->accept();
}
}
void frmInputBox::mouseReleaseEvent(QMouseEvent *)
{
mousePressed = false;
}
void frmInputBox::InitStyle()
{
this->setProperty("Form", true);
//窗体居中显示
myHelper::FormInCenter(this, myApp::DeskWidth, myApp::DeskHeight);
this->mousePressed = false;
//设置窗体标题栏隐藏
this->setWindowFlags(Qt::FramelessWindowHint);
//设置图形字体
IconHelper::Instance()->SetIcon(ui->lab_Ico, QChar(0xf015), 12);
IconHelper::Instance()->SetIcon(ui->btnMenu_Close, QChar(0xf00d), 10);
//关联关闭按钮
connect(ui->btnMenu_Close, SIGNAL(clicked()), this, SLOT(close()));
connect(ui->btnCancel, SIGNAL(clicked()), this, SLOT(close()));
}
void frmInputBox::SetMessage(QString title)
{
ui->labInfo->setText(title);
}
void frmInputBox::on_btnOk_clicked()
{
value = ui->txtValue->text();
done(1);
this->close();
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。