Questions tagged [qplaintextedit]

QPlainTextEdit is class in QtGui module which provides a widget that is used to edit and display plain text.

QPlainTextEdit is class in QtGui module which provides a widget that is used to edit and display plain text.

136 questions
2
votes
0 answers

Reading large amounts of text from QPlainTextEdit

I am experimenting with QPlaintextedit widget as a text editor, so far it works great, using it I can type large amounts of text and the UI doesn't freeze or stutter. I thought I would push the boundaries and see what happens. The basic gist is that…
user595985
  • 1,543
  • 4
  • 29
  • 55
2
votes
3 answers

QTextEdit or QTextBrowser performance issue

I have a heavy QString. I need to display it as an output. I tried both QTextEdit or QTextBrowser. And all methods of setting text like setText, append, setPlainText.....The performance is really poor. The most annoying things is that setting thing…
tom
  • 1,302
  • 1
  • 16
  • 30
2
votes
0 answers

QTextEdit - implement instant quote, apostrophe and grave accent

Most text editors don't show these characters immediately after you type them and merge them with a next character. However, I'm making code editor based on QPlainTextEdit for English alphabet only, so I'd like it to be instant. I've tried to…
LogicStuff
  • 19,397
  • 6
  • 54
  • 74
2
votes
1 answer

print QPlainTextEdit document plain text only

I'm wondering how to print the document of a QPlainTextEdit component without any colors, backgrounds or formats ( plain text only ). The code I have is printing the background ( white on black in my case ). QPrinter printer; QPrintDialog dialog(…
Yore
  • 384
  • 1
  • 4
  • 18
2
votes
1 answer

Enable text zoom via Ctrl+Wheel in QPlainTextEdit

The documentation mentions that Ctrl+Wheel key binding for zooming in/out is supported for QPlainTextEdit in both the editing key bindings and the read-only key bindings entries. This made me assume that this feature is there out of the box.…
sashoalm
  • 75,001
  • 122
  • 434
  • 781
2
votes
2 answers

Qt 5.3 QPlainTextEdit implement scroll lock

I'm using Qt 5.3 and a QPlainTextEdit based widget. I append/insert text all time time on it. I want to lock the scrolling if I manually scroll the contents, so the screen keep on the same place (the contents continuing being appended/inserted). I…
Yore
  • 384
  • 1
  • 4
  • 18
2
votes
1 answer

How to clear ExtraSelections in QPlainTextEdit

Sorry if this is a newbie question. I have some code for marking errors in an editor and I can't find how to clear the markings when the errors are gone. Here's the method I'm calling for rendering the errors. void Editor::highlightErrors( Thing* t…
mab13
  • 51
  • 1
  • 4
2
votes
1 answer

QTextCursor and beginEditBlock

I have some text in QPlainTextEdit, where every line starts with 10 spaces: line1 line2 line3 line4 Then, I select few lines and in a loop I want to remove first two spaces from all the selected…
Ecir Hana
  • 10,864
  • 13
  • 67
  • 117
2
votes
1 answer

QPainTextEdit add wave line

I've working on a small SQL IDE App which is a neat tool for writing SQL procedure for Oracle & DB2. I'm using Qt 4 as the GUI base. Still I want to add instant grammar check function for My SQL IDE, it will write a wave line under the SQL code…
Alexander
  • 69
  • 1
  • 6
2
votes
1 answer

Qt TextEdit smooth scrolling

In Qt, is it possible to have "smooth scrolling" in a text area? I mean, there is this Qt demo called "Code Editor" which uses QPlainTextEdit for an editable text area. When I scroll the area it always jumps one whole row at a time, i.e. the top…
Ecir Hana
  • 10,864
  • 13
  • 67
  • 117
1
vote
1 answer

Link to a line in a QTextBrowser

I'm trying to make an advanced find system. What i'm trying to do is to display in a QTextBrowser the line where the string that you're searching for and make it clickable. And for when you click it, it redirects you to that line. How would this be…
Kazuma
  • 1,371
  • 6
  • 19
  • 33
1
vote
1 answer

How to remove the empty space at the bottom of QPlainTextEdit

from PyQt5 import QtCore, QtGui, QtWidgets class Ui_MainWindow(object): def setupUi(self, MainWindow): MainWindow.setObjectName("MainWindow") MainWindow.resize(800, 130) self.centralwidget =…
Chris P
  • 2,059
  • 4
  • 34
  • 68
1
vote
1 answer

PyQt5: Avoid reducing multiple spaces in QLabel / QPlainTextEdit

In PyQt5, both QLabel and QPlainTextEdit Widgets appear to shrink multiple whitespaces in to one. Say if I set the label text to: "abc abc abc", text shown is "abc abc abc". Apparently, this is happening because of the default html formatting…
XYZ
  • 310
  • 2
  • 12
1
vote
1 answer

How to align QPlainTextEdit to right?

I want to write a notepad in python with PyQt5 for persian language. how can I align the thext in QPlainTextEdit to right? this is my code: from PyQt5.QtWidgets import QApplication, QMainWindow, QPlainTextEdit from PyQt5.QtCore import Qt,…
MSKF
  • 25
  • 8
1
vote
1 answer

Drag and Drop to QPlainTextBox

I'm trying to develop an ide with Pyqt5. What I want is to drag the contents of the list into the TextBox. The list elements should work like a button. For example, for "Sum", printf (a + b); should. But it doesn't let me drop the List element into…