Questions tagged [qtextbrowser]

QTextBrowser is a Qt widget providing a rich text browser with hypertext navigation capability.

QTextBrowser class extends QTextEdit in read-only mode adding some navigation functionality. This allows users follow links in hypertext documents.

Official Qt documentation can be found here for Qt 4.8 and here for Qt 5.

141 questions
0
votes
1 answer

How do I change the font size of previously written text in a textBrowser?

In my program, I am trying to automatically resize text size whenever the window size changes. I have used resizeEvent to do this and it is recognizing when the window is resized. However, whenever I try to change the font size using…
Abhi Garg
  • 73
  • 7
0
votes
0 answers

How to calculate value for vertical scroll bar from text inside of widget?

What I have is a Qt Text Browser which has an HTML table with one row, two columns. I have the almost same text at both columns which has slight differences. Those texts inside of columns are shaped with indentations, you can think them as python…
mtilhan
  • 258
  • 4
  • 12
0
votes
1 answer

QTextBrowser display issue in Qt 4.8.6 - always displayed wrongly

I hope to read some characters or strings and display them with QTextBrowse from serial port by Qt 4.8.6 and called the following functions( textBrowser is a object of QTextBrowser): connect(com, SIGNAL(readyRead()), this,…
pellyhawk
  • 86
  • 1
  • 6
0
votes
2 answers

Why text inside QTextBrowser is not displayed one-by-one instead it displays all-at-once?

The snippet I've used is as follows QDirIterator it(dir, filters, QDir::NoDotAndDotDot | QDir::AllEntries , QDirIterator::Subdirectories | QDirIterator::FollowSymlinks); while(it.hasNext()) { it.next(); …
0
votes
1 answer

why my qt program get stuck?

I'm printing the filenames in textBrowser_filename . But on commenting the snippet which prints the filename in textBrowser it runs smoothly. So is there any upper limit of text which can be printed/stored inside the textBrowser in…
0
votes
0 answers

Set text on a QTextBrowser without changing the font/style

i want to ask if there is a way to set the text of a QTextBrowser without changing its style. I'm using pyqt. I use Qt Creator to define the window style but i can't change a QTextBrowser text without chaning its style so i mainly have to full my…
brazoayeye
  • 329
  • 1
  • 2
  • 14
0
votes
1 answer

QTextBrowser content to File

Is there a way to dump content of QTextBrowser object to a file?
Nimesh
  • 1
  • 2
0
votes
1 answer

PyQt keeps closing most likely due to timer error

I am trying to get a line of text to display in the pyqt4 text browser. I am able to get it to display, but whenever I start to resize the window while I am running the function the PyQt window closes. Currently, it just closes without display…
0
votes
1 answer

Handling different links differently in QTextBrowser

I'm trying to set up a QTextBrowser where most hyperlinks work normally, but hyperlinks that begin with an arbitrary prefix will instead call a function. @three-pineapples supplied some great instructions here for how to achieve the latter behavior,…
Grav
  • 347
  • 1
  • 2
  • 15
0
votes
1 answer

Unable to click on hyperlinks in QTextBrowser edited by QTextDocument [qt]

I'm working on a messaging app. I use a QTextBrowser to display the message, but when it's read I change it a bit using QTextCursor. Before I started to edit the text, I could access any hyperlink I generated, but now this option is no longer…
Szpaqn
  • 545
  • 5
  • 17
0
votes
0 answers

How to select the last cell of a table in a QTextEdit (QTextBrowser)?

I am trying to select a part of a table with text that is in a QTextBrowser (QTextEdit acts the same in this matter). I've made the table using html tags and seting append(); I can select all the text with: cursor.movePosition(QTextCursor::End,…
Szpaqn
  • 545
  • 5
  • 17
0
votes
0 answers

Format text in QTextBrowser in PyQT

I want to write a text in QTextBrowser in PyQt. I have something like this: for line in working_data: word = line.split(";") self.ui.textBrowser.append("{:30}{:>30}".format(word[1], word[2])) With this I get something like (left…
Hrvoje T
  • 3,365
  • 4
  • 28
  • 41
0
votes
1 answer

How to control QTextBrowser horizontal scroll bar

The code below create a single QTextBrowser widget filling it with the long lines of text. Since there was view.setLineWrapMode(0) applied the view does not wrap the text but places each line on a single line regardless of how long the line is.…
alphanumeric
  • 17,967
  • 64
  • 244
  • 392
0
votes
1 answer

Insert text in while(1) loop to texteditor in QT

Am trying to print "Some text" to QTextBrowser, continuously for "n" time. Where "n" is integer. For this I have used QTimer::SingleShot for timing. Once the timeout is triggered a FLAG is set to false and this "FLAG" is monitored in while loop to…
learner
  • 45
  • 2
  • 8
0
votes
1 answer

How to remove dotted outline a link in QTextBrowser?

I used QTextCharFormat to format a link style and insert into a QTextBrowser, when click this link, it show dotted outline (I thought this is its focus style). How to remove these dots when it's clicked?
Kha Tran
  • 193
  • 1
  • 1
  • 10