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

QTextEdit with page break

I need to break in pages instead of scrolling rich text content in a QTextEdit. I tried to do this with QTextCursor and QFontmetrics but accuracy is not good enough. Somebody can help me? Thanks in advance !!!! K
user1414724
  • 29
  • 1
  • 6
0
votes
1 answer

QTextEdit change carriage position after setText

I can't find how to change carriage position on QTextEdit. I add text with setText(or setPlainText) methods, and after this carriage is at the beginning of QTextEdit input field, and I want it to be right after last symbol.
Hate
  • 1,185
  • 3
  • 12
  • 24
0
votes
1 answer

Why there is no zoom in and out slots in QPlainTextEdit?

I noticed that a QTextEdit has zoom in and zoom out slots and using them is very easy. However, I am using a widget that inherits from QPlainTextEdit and QPlainTextEdit has none of them which seems weird to me. I think these two widgets are do the…
Barış Akkurt
  • 2,255
  • 3
  • 22
  • 37
0
votes
1 answer

Qt QTextEdit Qt4.2 Valid HTML String

I am trying to generate the correct HTML to render to a QTextEdit Using Qt 4.2 on RHEL 5.3. So far my algorithm generates the following html. I am not an expert web developer, but to me this string seems valid. 319:14:27:22:
Matthew Hoggan
  • 7,402
  • 16
  • 75
  • 140
0
votes
1 answer

qtextedit change font

I am using QTextEdit in my project I want to change the Font of the text edit area when user clicks on a button. I am using QTextEdit::setCurrentFont() function for this purpose. But, in order to change the font, the user has to first select some…
Hariprasad
  • 3,556
  • 2
  • 24
  • 40
0
votes
2 answers

Qt QTextEdit loading just half text file

I have a problem: my project is a very simple one with a QTextEdit and a QSyntaxHighlighter, I'm trying to load a .cpp file and highlighting just the eighth line of that file, but the QTextEdit can't load the entire file if I ask it to highlight the…
Johnny Pauling
  • 12,701
  • 18
  • 65
  • 108
0
votes
1 answer

How to determine the font of a QTextBlock

Let's say a user pastes some random text into a QTextEdit. How do you determine which font that text is in. For example, Chinese. I've tried getting the QTextCharFormat for the block. But it seems to be empty of information. Querying for…
0
votes
2 answers

Increasing spaces between words,ordering words in columns

Is there possibility to easily increase spaces between words in QTextEdit? My only idea is to set space key event to insert more whitespaces, but i would better like some setting parameters solution? Is there way to set words in columns in text…
krzych
  • 2,126
  • 7
  • 31
  • 50
0
votes
1 answer

QTextEdit display width vs text width

I'm creating a 'scrolling-text' class in Qt, using a QTextEdit (read-only, no scrollbars, moveCursor) and a QTimer - simple and working. My problem is when the text sent to the class is shorter (narrower) than the QTextEdit-box. Silly, I agree, but,…
Rami Rosenbaum
  • 467
  • 5
  • 18
0
votes
1 answer

Qt Some ASCII Missing Only on Certain Machine

I have a problem with a QTextEdit. When I compile and run on my development environment from QtCreator in either debug or release modes, the text edit displays characters just fine. They all show up perfectly. Additionally, if I copy all of the…
San Jacinto
  • 8,774
  • 5
  • 43
  • 58
0
votes
2 answers

Make setText of QTextEdit ^Z aware

When I use QTextEdit::setText() , changes seems to be inrevokable , you can't get back with CTRL+Z , is there any other API I should use ?
daisy
  • 22,498
  • 29
  • 129
  • 265
-1
votes
1 answer

PyQt5: QAction -- QTextEdit.paste not working with QTabWidget?

PyQt5: QAction -- QTextEdit.paste not working with QTabWidget? Trying to learn python, I have started a project to write a tabbed markdown editor. In the code below everything works as expected, I can: Add and Remove tabs Use the keyboard to add…
Irvine
  • 11
  • 4
-1
votes
1 answer

Creating a context menu when user selects text inside a QMainWindow

I'm making a text editor and one aim is to create a context menu that appears when the user selects/highlights text with their mouse which will bring some further options. It is important that I can read the text the user selects into some other…
Grudy
  • 69
  • 1
  • 6
-1
votes
1 answer

How should I save QTextEdit content with format to database?toPlainText method not get format

def add_question(self): sub_id = self.qSubComboBox.itemData(self.qComboBox.currentIndex()) question = self.textEdit.toPlainText() option1 = self.textEdit_2.toPlainText() option2 = self.textEdit_3.toPlainText() option3 =…
-1
votes
1 answer

Count how many lines are in a QTextEdit

I'm trying to setup a program which will count how many lines are in a QTextEdit and run a for loop for the amount of lines have been counted. How could I go about doing this?
John
  • 11
  • 1
  • 2
1 2 3
38
39