Questions tagged [qtextedit]

QTextEdit is a class from the Qt Toolkit which provides a widget that is used to edit and display both plain and rich text. It is optimized to handle large documents and to respond quickly to user input.

The official Qt documentation can be found here for Qt 4.8 and here for Qt 5.

575 questions
0
votes
3 answers

focusInEvent not called in QLineEdit subclass

I have a Qt/cpp code and display a subclassed QLineEdit. When double-clicking the QLineEdit, the focusInEvent is never called (launched in Maya). void myQLineEditClass::focusInEvent(QFocusEvent *e) { …
Laurent Crivello
  • 3,809
  • 6
  • 45
  • 89
0
votes
3 answers

Why is my slot not being called?

I have this class: class CustomEdit : public QTextEdit { Q_GADGET public: CustomEdit(QWidget* parent); public slots: void onTextChanged (); }; CustomEdit::CustomEdit(QWidget* parent) : QTextEdit(parent) { connect( this,…
Tony the Pony
  • 40,327
  • 71
  • 187
  • 281
0
votes
1 answer

What event (if any) does QTextEdit fire when the size of its content changes?

As the title says, how can I receive notification whenever a multi-line QTextEdit changes the size of its content? (Note: content size is different from the control size, i.e. I want to know when lines were added or removed, or changed height…
Tony the Pony
  • 40,327
  • 71
  • 187
  • 281
0
votes
1 answer

PySide QTextEdit or QPlainTextEdit update faster?

I am now trying to make a GUI on my PC communicate with a Server per sockets. here is part of the code of GUI: def listenToServer(self): """ keep listening to the server until receiving 'All Contracts Finished' """ …
Richard
  • 3
  • 1
0
votes
1 answer

How to select a QTextEdit paragraph?

Hello everyone and thanks for your time, I need to select a entire and correct paragraph (from dot to dot) on cursorPositionChanged() or selectionChanged() but I can't do it so far using Python + Qt4, I've tried using cursor.position() and…
0
votes
1 answer

Read specific text in an updating qtextbrowser

In python I have a QtextBrowser which is fed the output of an external command. this works great Within the output is a progress update: loadingfile processing file progress 5% progress 10% progress 25% .... closing file processing completed I want…
sjm1983
  • 1
  • 1
0
votes
1 answer

pyqt: QTextEdit: save changed text

I am trying to call my function with changed text as parameter. QtCore.QObject.connect(Ui().textEdit, QtCore.SIGNAL("textChanged()"), lambda mytext = Ui().textProfileDesc.toHtml(): self.myprint(mytext)) But it doesn't work, in mytext is the text…
Meloun
  • 13,601
  • 17
  • 64
  • 93
0
votes
1 answer

QTextEdit add an abbreviate system

I'm currently working on a text editor, I want to create an abbreviate system. I mean for example when you write html5 then press key tab for example you expand an code like this : ... Maybe I used the wrong…
zed13
  • 357
  • 4
  • 21
0
votes
0 answers

QT: How to control the cursor in MainWindow.ui

In Qt, I have three QTextEdit1 widgets aligned vertically in MainWindow.ui. When I run the application, the cursor always becomes active on the QTextEdit2 widget (not the first which the user must fill first). Another issue is when I press tab on…
user3009135
  • 315
  • 1
  • 2
  • 7
0
votes
3 answers

How to do a wrapped text finder?

I am working on a text finder in QtCreator(c++). I used a "QtextEdit::find" function and it finds every occurrence of the searched word until the document reaches the end, when a NEXT button is pushed. Now I want to add a "QCheckBox" that when…
user4423887
0
votes
1 answer

QTextStream writes wrong data to file

I try to read and write from same file but get strange behavior. Here is example code : mainwindow.h #ifndef MAINWINDOW_H #define MAINWINDOW_H #include #include #include namespace Ui { class…
ratojakuf
  • 708
  • 1
  • 11
  • 21
0
votes
1 answer

Qt - change the text of QTextBrowser inside GridLayout

I've got a QGridLayout filled with QTextBrowser's. I am getting access to them using itemAtPosition(i,j), so I can eg. change to background using widget()->setStyleSheet. Is there any way to change the text inside those fields?
Skipper
  • 775
  • 6
  • 17
  • 32
0
votes
1 answer

How to update a QTextEdit in real-time

i have one UI with QtextEdit, (1) i want to update QtextEdit and main UI can display realtime and no stuck. when use sleep ,not work as i want. (2) i want have make one function and pass parameter to it, and the QtestEdit can update display real…
soneedu
  • 73
  • 1
  • 3
  • 11
0
votes
1 answer

How to display non-printable symbols in QTextEdit pyqt4?

Is there an example of how to display special characters (i.e. u'\u2022', u'\u21b5', u'\u2192') instead of non-printable symbols (i.e. ' ','\n', '\t') in QtGui.QTextEdit PyQt4, but without replacing them?
user2866992
  • 103
  • 1
  • 1
  • 6
0
votes
1 answer

TypeError while using QTextEdit methods

I have built a text editor using PyQt and I'm trying to display a string to it I tried to use QTextEdit.append(), QTextEdit.setText() but I'm getting TypeError in each case. I'm doing: qstring_result =…
tryPy
  • 71
  • 1
  • 11