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

QTextBrowser not displaying non-english characters

I'm developing a Qt GUI application to parse out a custom windows binary file that stores unicode text using wchar_t (default UTF-16 encoding). I've constructed a QString using QString::fromWcharArray and passed it to QTextBrowser::insertPlainText…
shebaw
  • 1,775
  • 1
  • 13
  • 15
1
vote
1 answer

How to set character encoding for QTextBrowser in Qt?

I have a QTextBrowser in which I display the output contents of an external binary using QProcess in Linux. All is GOOD! But most of the contents are just boxes, so now it's the character encoding UTF-8 is missing and I need to tell this to the…
jxgn
  • 741
  • 2
  • 15
  • 36
1
vote
1 answer

Why Unicode fonts are not showing properly in the QTextBrowser when Unicode contents are read from an html file?

I am reading an html file. The file basically contains Unicode texts as follows: akko- sati (ā + kruś), akkhāti (ā + khyā), abbahati (ā + bṛh) But the QTextBrowser is not interpreting the Unicode fonts. So the QTextBrowser shows them as…
Bhaddiya Tanchangya
  • 331
  • 1
  • 5
  • 12
1
vote
2 answers

How to give a method name to href?

I have a QTextBrowser() object: self.PAddressLink = QTextBrowser() I need to click on a link placed on this QTextBrowser, and it should open a new dialog box. self.PAddressLink.setHtml("+Add Permanent…
Ejaz
  • 1,504
  • 3
  • 25
  • 51
1
vote
1 answer

Adding forward and back buttons inside a layout

I have a horizontal layout inside which i have added a group box. The group box is split using a QSplitter and contain a QListWidget and a QTextBrowser. I want to add two push buttons at the bottom right corner of the window to navigate inside the…
Beginner
  • 43
  • 4
1
vote
2 answers

Qt text browser not displays in real time

I wrote a function to calculate some values and used append to write them to the textBrowser every time a value was calculated. What I want is that every time the append executes, data is displayed in the textBrowser simultaneously. However, all…
CyberLuc
  • 317
  • 1
  • 2
  • 8
1
vote
2 answers

QTextBrowser: How to highlight a clicked line

In my textbrowser, I've already implemented the mousePress and found the line number when clicked. Now I want to highlight where I clicked i.e., change its background color. I knew line is different with block. Luckily in my text one line is one…
TonyLic
  • 647
  • 1
  • 13
  • 26
1
vote
1 answer

PyQt depth of QTextEdit buffer

I'm using a PyQt QTextBrowser widget that inherits from QTextEdit. I'm appending text to it as part of a display of logging information. The logging may go on for weeks. What is the depth of the buffer that holds the text? Asked another way, how…
JohnSantaFe
  • 145
  • 1
  • 3
  • 11
1
vote
3 answers

PySide/PyQt Text in QTextBrowser disappears after clicking on a link in it

I have the following variable appended to 'QTextBrowser'. It does appear as a link, but when I click on it all the text in the 'QTextBrowser' disappears. All the function the 'anchorClicked' signal is connected to does is print something in the…
UrbKr
  • 621
  • 2
  • 11
  • 27
1
vote
1 answer

QTextBrowser not processing CSS properly

I am having problems with rendering HTML with QTextBrowser. It does not process some CSS properties such as tr height, table borders, etc. For instance, This does not work: This does not work:
Didac Perez Parera
  • 3,734
  • 3
  • 52
  • 87
1
vote
2 answers

Is it possible to read data from the text browser of QT GUI

i'm trying to make a chat application in QT . Is it possible to read data from the text browser of QT GUI(which shows conversations) so that i can maintain a chat history...?plz help..Thank You
kernel
  • 326
  • 1
  • 3
  • 18
0
votes
0 answers

Using QTextCursor to select and delete a given row from QTextBrowser

I ask for help with the question given in the title. The textBrowser receives links from the process polling the OTRS server for applications with the 'open' flag, if this flag changes to 'close', then the line intended for deletion is transmitted…
Pavel_G
  • 11
  • 3
0
votes
1 answer

QT 4.8.6 TextBrowser Displaying Hyperlinks That Runs Functions

I want to add a hyperlink to a textBrowser in order to open a dialog. To be specific, I am using the textBrowser as a error messages window and if I click to a message I want to open a dialog. I made a hyperlink that opens website with…
0
votes
0 answers

PyQt6 QTextBrowser find text and put it at the top and deselect it

I am writing a Help/About box that reads the README.md and displays it. If about is passed in, it is supposed to scroll to that portion of the file and put the about at the top. This code correctly locates the text in the file and moves the…
jordanthompson
  • 888
  • 1
  • 12
  • 29
0
votes
1 answer

Unexpected results when appending links and line breaks to QTextBrowser

I'm getting some unexpected results when appending strings with links and line breaks to a QTextBrowser instance. browser = QTextBrowser() browser.append('foo example.com bar') browser.append('foo\n
mahkitah
  • 562
  • 1
  • 6
  • 19