1 Star 0 Fork 1

Ccing/QtiASL

forked from softxing/Xiasl 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
minidialog.cpp 1.43 KB
一键复制 编辑 原始数据 按行查看 历史
ic005k 提交于 2022-02-04 11:18 . Add files via upload
#include "minidialog.h"
#include <QLabel>
#include "ui_minidialog.h"
extern QsciScintilla* miniDlgEdit;
extern miniDialog* miniDlg;
extern int red;
ZoomEditor::ZoomEditor(QWidget* parent) : QsciScintilla(parent) {}
miniDialog::miniDialog(QWidget* parent)
: QDialog(parent), ui(new Ui::miniDialog) {
ui->setupUi(this);
setWindowFlags(Qt::FramelessWindowHint);
ui->gridLayout_2->setMargin(0);
miniDlgEdit = new ZoomEditor(this);
ui->gridLayout->addWidget(miniDlgEdit);
QLabel *lblTip = new QLabel(miniDlgEdit);
lblTip->setText(tr("Left click: Position to the current line.") + "\n"
+ tr("Right click: Copy the current line."));
QColor color;
if (red > 55)
color.setRgb(245, 245, 245, 255);
else
color.setRgb(50, 50, 50, 255);
miniDlgEdit->setPaper(color);
miniDlgEdit->setContextMenuPolicy(Qt::NoContextMenu);
miniDlgEdit->setMarginWidth(0, 0);
miniDlgEdit->setMargins(0);
miniDlgEdit->setReadOnly(1);
miniDlgEdit->SendScintilla(QsciScintillaBase::SCI_SETCURSOR, 0, 7);
//水平滚动棒
miniDlgEdit->SendScintilla(QsciScintilla::SCI_SETSCROLLWIDTH, -1);
miniDlgEdit->SendScintilla(QsciScintilla::SCI_SETSCROLLWIDTHTRACKING, false);
miniDlgEdit->horizontalScrollBar()->setHidden(true);
miniDlgEdit->verticalScrollBar()->setHidden(true);
}
miniDialog::~miniDialog() { delete ui; }
void ZoomEditor::mouseMoveEvent(QMouseEvent* event) {
Q_UNUSED(event);
miniDlg->close();
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C++
1
https://gitee.com/Ccing/QtiASL.git
git@gitee.com:Ccing/QtiASL.git
Ccing
QtiASL
QtiASL
master

搜索帮助