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

Qt get text changed

Alright, so we have the private slot method textChanged that notifies us when a textEdit object was modified. This implementation is rather robust and informs us when text is inserted with keyboard, with copy and paste, and most of anything else. Is…
Paul Bae
  • 60
  • 1
  • 6
0
votes
0 answers

True interactive os shell in Python using PyQt4 gui

I'm looking for a python module that provides a TRUE interactive os shell (in Linux, win, & mac os) via the STDIO. I've tried various examples using subprocess+PIPES and/or QProcess to start csh/bash or cmd.exe and then provide a crude terminal IO…
bbtexas
  • 1
  • 2
0
votes
2 answers

Could someone help me to figure out the hierarchy between QTextEdit,QTextDocment,QTextBlock,QTextFrame,etc.?

Could someone help me to figure out the relations between QTextEdit, QTextDocment, QTextBlock, QTextFrame, etc.? I need an overview,thank you in advance. I just want to have a thorough knowledge of QTextEdit. Perhaps someone want to mark me as lazy…
waterd
  • 603
  • 1
  • 7
  • 23
0
votes
1 answer

QTextEdit. In textChanged slot change colors for some words and restore

I need to paint some words in QTextEdit by other colors. void Wnd::onTextChanged() { QString s = ui->textEdit->toPlainText(); s = addColors(s); ui->textEdit->blockSignals(true); ui->textEdit->setHtml(s); …
Ufx
  • 2,595
  • 12
  • 44
  • 83
0
votes
1 answer

How to redirect print result from python shell into qtextedit pyqt?

I want my output to appear in my pyqt textedit not python shell after clicking a pushbutton. I am not familiar with subprocess or stdout stuff and not even sure if this will involve them. Need some help here. Here is part of my code: …
Viv91
  • 45
  • 2
  • 8
0
votes
0 answers

QTextEdit Paginating

I'm trying to write simple PyQT report editor and what I need is to exactly know what sizes the page has, MS-Word like. Today I found the following link: How to access QTextDocument pages that shows how to use an QPrinterPreviewDialog, and it…
Maciek
  • 183
  • 1
  • 8
0
votes
0 answers

How to highlight string of QTextedit in android using Qt 5.3?

can anyone help me How to highlight string of QTextedit in android using Qt 5.3 ? ---update---- in android native textedit when you touch and hold word , the word highlighted , i want highlight string in QTextEdit like this...
aidinMC
  • 1,415
  • 3
  • 18
  • 35
0
votes
1 answer

QTextEdit check if its bold

I have a bold button that when selected can set the text and make it bold as follows: QTextCursor cursor = this->ui->editNotes->textCursor(); QTextCharFormat format; format.setFontWeight(QFont::Bold); cursor.mergeCharFormat(format); The question is…
adviner
  • 3,295
  • 10
  • 35
  • 64
0
votes
1 answer

qt use widget crash

I have a class : class gameClientInteraction : public QMainWindow with, in the .h : private : QTextEdit* console; my constructor is like this : gameClientInteraction::gameClientInteraction() { // Menus QMenu *menuFichier =…
Micka753
  • 15
  • 6
0
votes
1 answer

How to select a table using QTextCursor

I expect this code should work but it doesn't QTextCursor cursor = textEdit->textCursor(); cursor = QTextCursor(cursor.currentFrame()); cursor.movePosition(QTextCursor::EndOfBlock,…
tmporaries
  • 1,523
  • 8
  • 25
  • 39
0
votes
0 answers

QTextEdit and QSplitter

How do I add a QTextEdit to a QSplitter? I have got a QString which I have added to a QTextEdit which I now want to display in a QSplitter. Is this possible or must it be changed to something else in order to add it to a QSplitter?
Dmon
  • 220
  • 4
  • 15
0
votes
1 answer

Piping log output to QTextEdit widget

There are some 'similar' questions in stackoverflow, but can't quite implement them. In pyqt, I'm trying to pipe the output of a logfile (which is updating real-time) into a QTextEdit widget. The code I have so far is: file = QFile('tmp') …
Paul Nelson
  • 1,291
  • 4
  • 13
  • 20
0
votes
1 answer

QTextEdit: How to add fixed position text on top of an image

I am using QTextEdit to implement an editor. One of the requirements I have is to add fixed position text on top of an image. For example: I have an image of dimensions: 300x300. I need to add text beginning at the location (20, 20) of the image and…
go4sri
  • 1,490
  • 2
  • 15
  • 29
0
votes
1 answer

C++ Qt QTextEdit when put in a vertical layout goes off designer window

In Qt designer, i'm trying to make a text editor so in the window I have a QTextEdit and a QDockWidget so they re size with the window I put them both in a vertical layout as a previously said and when I do they both go off the window. The fix i'm…
New Europe
  • 31
  • 7
0
votes
1 answer

PyQt: Console-like interface as a QTextEdit subclass

I'm a novice attempting to write a Z-machine interpreter -- a specialized virtual machine for text adventures like Zork -- in Python, using PyQt4. I decided to subclass QTextEdit for the program's main interface, but I'm having trouble turning it…