git-svn-id: svn://db.shs.com.ru/libs@335 a8b55f48-bf90-11e4-a774-851b48703e85

This commit is contained in:
2017-11-30 09:17:35 +00:00
parent 8cdbe203bf
commit 05c49c1e5d
4 changed files with 9 additions and 2 deletions

View File

@@ -10,6 +10,7 @@
#include <QAction>
#include <QApplication>
#include <QHeaderView>
#include "qad_types.h"
QCodeEdit::QCodeEdit(QWidget * parent): QWidget(parent) {
@@ -65,6 +66,7 @@ QCodeEdit::QCodeEdit(QWidget * parent): QWidget(parent) {
textCode->setFrameShape(QFrame::NoFrame);
textCode->setLineWrapMode(QPlainTextEdit::NoWrap);
textCode->setTabChangesFocus(false);
textCode->setCursorWidth(qMax<int>(qRound(fontHeight() / 10.), 1));
textLines->setFrameShadow(QFrame::Plain);
textLines->setFrameShape(QFrame::NoFrame);
textLines->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Expanding);
@@ -795,7 +797,7 @@ void QCodeEdit::raiseHelp(QTextCursor tc, int arg) {
tc.movePosition(QTextCursor::Left, QTextCursor::MoveAnchor, st.size());
lbl_help[0]->setFont(font());
widget_help->resize(widget_help->sizeHint());
widget_help->move(textCode->mapToGlobal(textCode->cursorRect(tc).topLeft() - QPoint(0, widget_help->height() + 8)));
widget_help->move(textCode->viewport()->mapToGlobal(textCode->cursorRect(tc).topLeft()/* - QPoint(0, widget_help->height() + 8)*/));
widget_help->show();
cursor_scope = scope.first;
cursor_scope << scope.second;