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

Open external file-path links with spaces in QTextBrowser

I'm working in a Python App. In some parts of the program I inform the user that different files are created. I show this information in a QTextBrowser widget. I want that this text is hyperlinked, so if the user clicks on the hyperlink, the file…
RBenet
  • 171
  • 1
  • 10
2
votes
2 answers

How to redirect Python script output to PyQT5 GUI Console, without any buttons clicks?

Hey I am using the same old code for getting all the code outputs PyQT5 QTexBrowser GUI console, but I am also getting next line character ("\n") in all new lines. Code URL - pipe the output of sys.stdout to text browser in pyqt Below is the code I…
2
votes
1 answer

QTextBrowser click on text changes font

I have a weird question, I am creating a GUI for a chatbot and I've chosen PyQt5 Designer to do so. Everything has been working perfectly but now I've implemented some hyperlinks and realized that when I click a line with different font in…
2
votes
1 answer

How to display a clickable hyperlink in QTextBrowser

I've created a GUI in which you enter something, in the search bar, it goes directly into duckduckgo and searches for the entered element and then it prints all the hyperlinks in a QTextBrowser. But the links are not clickable. I don't know how to…
vesuvius
  • 435
  • 4
  • 20
2
votes
1 answer

QTextBrowser html link not clickable

I am trying to add a link to a QTextBrowser and allow it to be clicked. I can get the link to display properly, but when I hover over it the mouse does not change at all (as if it were a URL to click) and you can't click it. I have setReadOnly and…
Zak44
  • 341
  • 1
  • 5
  • 24
2
votes
0 answers

PyQt5 - Changing font color under cursor

I'm trying to change the color (Red) of the font that will be highlighted. The problem I'm facing is, as soon as I highlight the first word, all the following text becomes Red. def cursorPosition(self): logging.debug("Cursor Positiong changed") …
b-ak
  • 141
  • 5
2
votes
1 answer

Sphinx Integration in Qt

I would like to integrate Sphinx documentation functionality to help with my Qt project. However, when including the HTML files for Sphinx, the formatting appears differently and no file links work. For example: QFile…
Mister David
  • 49
  • 1
  • 10
2
votes
1 answer

How to add hyperlinks and user clickable actions into qtextbrowser

Currently, I am adding text data into qtextbrowser. In this data, there is a hyperlink(that I am capturing using qregex) and a filepath(for one of my directories). Now, on click of the hyperlink, I want to open the link in one of the browsers of…
2
votes
0 answers

How to make QListWidget auto-format the Item's text

The code below creates a QTextBrowser populated with 5 lines. Each line is 100+ characters long. To make all the characters (the letters) visible the QTextBrowser reformats the text as soon as the size of the widget is changed. Try to drag the…
alphanumeric
  • 17,967
  • 64
  • 244
  • 392
2
votes
0 answers

Bubble style chat in QTextEdit

I want to create a bubble style chat application like WhatsApp using QTextEdit. I know that QTextEdit only supports a small subset of HTML and CSS and I can't directly create bubbles by using HTML/CSS supported by it. Can the needed be achieved by…
user221458
  • 716
  • 2
  • 7
  • 17
2
votes
1 answer

QTextBrowser behavior different between debug and release build

I've been using QTextBrowser to display log files. The Debug build works properly with non-English characters after setting the proper font. But when building it in Release mode, it displays empty rectangles for the non-English characters no matter…
shebaw
  • 1,775
  • 1
  • 13
  • 15
2
votes
0 answers

Using QTextEdit and html to display formatted log-text

I need to display a large (and increasing) log-file with QTextEdit (alternatively with QTextBrowser, must be one of those 2, though) and format the output in 3 columns with following properties: 1. column: text top-right aligned, fixed width, always…
HardCoder
  • 3,026
  • 6
  • 32
  • 52
2
votes
1 answer

Change last line in QTextBrowser

I have a QTextBrowser that displays lines of QString and an Int. The messages looks something like this: Message a counter 1 Message a counter 2 Message a counter 3 Message b counter 1 Instead of always appending a new line for each incrementation…
testus
  • 183
  • 2
  • 21
2
votes
1 answer

Textbrowser displaying an image showing "QFSEngine::open: No file specified " warning

I´m using a QTextBrowser to display an external html document (and its image resources) which is placed in the same directory as the application.The relative paths don't work at all and If I type in the absolute file path of the image, it is…
Beginner
  • 43
  • 4
2
votes
1 answer

Qt TextBrowser Horizontal Scrollbar

How do I make a horizontal scrollbar appear whenever the application is resized so that every line is as appears? Sometimes, filenames are really long and I don't want to manually resize the form UI. I have tried setting the scrollbar policy to as…
Quaxton Hale
  • 2,460
  • 5
  • 40
  • 71
1
2
3
9 10