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
0
votes
1 answer

PyQt5: How to display traceback(s) into a Widget?

I which to display the errors into a QPlainTextEdit or any other widget more suitable for that. code.py: import traceback from PyQt5 import QtCore, QtGui, QtWidgets class Ui_MainWindow(object): def setupUi(self, MainWindow): …
user15034500
0
votes
0 answers

Clearing the selection of a highlight cursor in a QPlainTextEdit

I build a custom PlainTextEdit to serve as a logviewer widget. I have a external lineEdit widget to specify a search pattern (similar to how you use ctrl+f to find a text on a website). The lineEdits textChanged signal is connected to the…
hdmjt
  • 25
  • 3
0
votes
0 answers

QPlainTextEdit graphical bug on Windows & Linux

I'm writing a simple GUI that displays a live-updating log in a QPlainTextEdit. This is the handler I am passing to logging.Logger.addHandler() class QPlainTextEditLogger(logging.Handler): """Modified From:…
James
  • 325
  • 1
  • 3
  • 15
0
votes
1 answer

How to remove exact text from QPlaintextEdit from Qlistidget if unchecked item?

I want to remove exact match text from the QPlaintextEdit from Qlistwidget when unchecking the item. it is removing the items but also removing other matched text. for e.g: There are "Fname1 Lname1", "Fname2 Lname2", "Fname3 LName3", "Fname",…
user3030327
  • 411
  • 1
  • 7
  • 19
0
votes
1 answer

How to remove matched string ( text ) in QPlainTextEdit from Qlistwidget unchecked item?

Below is my example code: from PyQt5 import QtCore, QtGui, QtWidgets class Ui_Form(object): def setupUi(self, Form): Form.setObjectName("Form") Form.resize(691, 327) self.listWidget = QtWidgets.QListWidget(Form) …
0
votes
0 answers

How to remove empty space between adjacent selected lines?

I have a QPlainTextEdit and whenever I select some text, there is empty space between the adjacent selected lines (see image below). I suspect that this is related to the line height, but so far I haven't been able to find a solution. Any…
user31208
  • 1,448
  • 1
  • 18
  • 22
0
votes
0 answers

Python PyQt5 QPlainTextEdit Scroll Bar Not Displaying Handle

I have a QPlainTextEdit box in an application that shows information to the user. The application code is huge, so I'll just include the relevant part of the code: class ProgressBox(QPlainTextEdit): """Represents the progress information…
user12918986
0
votes
1 answer

Saving text from QPlainTextEdit by QFileDialog and creating .txt file

I have troubles with saving note(text from QPlainTextEdit). I need only saving in txt format. After typing text and clicking button program displays error 'expected string or bytes-like object not nonetype'.Notepad's program starts from class…
iMAGA07
  • 25
  • 4
0
votes
1 answer

Qt moveCursor no longer changes selection boundary

I am displaying text in a QPlainTextEdit, in a programming language (Basic) that can have a type-specific character at the end of an identifier; e.g. MyString$ or StartChar@. So if the user selects such an identifier by double-clicking, I want the…
TonyK
  • 16,761
  • 4
  • 37
  • 72
0
votes
0 answers

How to detect if a string is variable In a code editor written QPlainTextEdit?

I am writting a javascript code editor with QPlainTextEdit, and now I am workding on code completion with QCompleter.The question is I don't know which string is a variable in the plaintext.I firstly detect the variable according to the…
Lichard
  • 41
  • 5
0
votes
1 answer

QPlainTextEdit memory leak

I wrote a simple app with Qt 5.9.6, I ran that and wondered the used memory is growing. After tracing/debugging my application, I realized something about QPlainTextEdit !!! The memory leak was for a qplaintextedit as a scratchpad in my app, but…
0
votes
1 answer

Changing qt5 tab names dynamically

Say I have a tabwidget in my ui file this is how im adding tabs right now: QPlainTextEdit *tab = new QPlaintextEdit; int index = ui->tabWidget->addTab(tab, "changeme"); Now I'm wondering if it's possible to change the name of the tab on the go,…
0
votes
0 answers

QPlainTextEdit text and increase filename in new line in the window

In my script I have a QPlainTextEdit window , when I run my pushbutton script printing a line in my window with ---projectname-seg(Segment)-group_name---, My problem is: when I run my script line is added, when I run it again is added to but I would…
AnneRose
  • 15
  • 8
0
votes
0 answers

colored text will disappear(no color) after I copied the colored text from QPlainTextEdit to notepad

QTextCharFormat tf; tf = m_txtLog->currentCharFormat(); tf.setForeground(QBrush((Qt::GlobalColor)7)); tf.setTextOutline(QPen((Qt::GlobalColor)7)); m_txtLog->setCurrentCharFormat(tf); m_txtLog->appendPlainText("RED"); Text will become red after the…
Marko Ma
  • 3
  • 5
0
votes
1 answer

How to make pages look in QTextEdit or QPlainTextEdit

I am trying to make the look of pages in QTextEdit or using it to do so. Each page has a limited number of lines per page and a limited number of character per line and the first thing is the look and feel of pages. so I try to use this…
user7179690
  • 1,051
  • 3
  • 17
  • 40