qtextedit

How to implement QTextDocument serialization

This question I have asked before and just got answer that there is an open bug for this. But this is a really required feature and, I guess, each Qt programmer who programmes a more or less serious application, it is quite probable that there is used a QTextEdit and the data is inserted in QTextEdit is serialized and deserialized. Thus ...

Scroll QTextBrowser to the top

I have the following: QString html = ui->DetailsTextBrowser->document()->toHtml(); html = details.replace("#VERSION", "1.0"); ui->DetailsTextBrowser->document()->setHtml(details); Unfortunately after the HTML content of the DetailsTextBrowser is set the document is scrolled to the bottom. I tried without success: ui->DetailsTextBrow...

Partially editable PyQt4 TextEdit

I'm currently making a frontend for my favorite expression-oriented arbitrary-precision calculator using PyQt4. The problem with it is that there doesn't seem to be any way to make part of a TextEdit widget read-only (specifically, the text that has already been sent and the results thereof) but the rest of it fully editable. Do I need t...

How to create a class that is a widget that has a QTextEdit and a QToolBar above the text edit.

My intent is to create a QTextEdit with its reach text controls. The controls I want to put in a toolbar. But I have difficulties with controling the layout. The problem is that the overlap if I put a QTextEdit in a QWidget (my class inherits QWidget) which has a toolbar. Another way I tried was the following: my class inherits QTextEdi...

How to format the selected text in a QTextEdit by pressing a button.

I want to format a selected text in a QTextEdit by clicking a button. For axample I want to make it bold if it is not-bold, or not-bold if it is bold. Please help me with an example. EDIT: Actually I have found already a code - qt demo for text editor which does what I need: void MyTextEdit::boldText(bool isBold) //this is the SLOT fo...

How to create a bulleted or numbered list with Qt?

How to create a bulleted or numbered list in QTextEdit with Qt by clicking a button? Also it is necessary that make a list the paragraphes which are selected by clicking the same button. And when the cursor is in the list and you click the button, the the list item becomes not-list item, but a simple paragraph. In two words I want to cr...

Qt WYSIWYG editor - non-editable/generated regions

I am developing a WYSIWYG document editor. The editor is build around the Qt framework because Linux/KDE is the main platform it will run on. I have been using the QTextEdit widget so far and have gotten basic text editing and formatting in. However I've come to a standstill on how to implement the following requirement: A document is ...

How to resize an image in a QTextEdit?

How to click on the image, hold from a corner of it, and resize the image in the QTextEdit? Or at least how to get an image under cursor/that is selected in order to change width and hight? ...

Find text in QTextEdit and scroll the line to top

There is a QListWidget containing keywords for search and a QTextEdit containing some text. Clicking on one of the keywords should result in matching the word in the QTextEdit and scrolling the corresponding line to the top. I connect the QListWidget and the QTextEdit with signal/slot and perform a QTextEdit::find(), which almost result...

I want to make my own source code editor, what are the good choices to make ?

I've had it of those dozens of editors which never provides simple things like: distinguish type keywords and instruction keywords so I can put different colors on them. being cross platform using a standard GUI lib like qt gtk etc (notepad++, yes, I almost hate you). enough keyboard shortcut like duplicate line, comment selection, and...