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
2 answers

Is there a function that can display an object from a class that I've created into a QTextBrowser?

I'm creating a GUI that stores and displays objects of various data types such as int, double, string and three other class that i have created that are Rational, Date, and Complex. These objects are stored into Linked Lists of the same type. For…
1
vote
0 answers

Get hyperlink Response value as python variable

I have a QTextBrowser Widget which is used to display hyperlinks. There are text with value assigned to them. I need to return an integer value to python variable when hyperlink is clicked. The code snippet looks like below: self.textWin =…
1
vote
1 answer

Pyside2 QTextBrowser overwriteMode does not replace old text

I'm using the PySide2 package and found that the overwriteMode won't work in my code. Here is what I…
seediq
  • 13
  • 5
1
vote
1 answer

Not underlining hyperlink in QTextBrowser

When setting an hyperlink to a QTextBrowser, I would like that link not to be underlined. In previous versions of Qt (e.g. 2,3,4), there used to be a setLinkUnderline(bool) method which probably did the job. How to do this with Qt5 ? thanks
Eurydice
  • 8,001
  • 4
  • 24
  • 37
1
vote
2 answers

Python - pyqt5 - Set text to qtextbrowser with different colors

I have a String array which contains correctly spelled words and misspelled words. I want to set all those words to a qtextbrowser and I want to make misspelled words red color. wordlist = ['correct1', 'correct2', 'incorrect1', 'correct3',…
Ishara Madhawa
  • 3,549
  • 5
  • 24
  • 42
1
vote
1 answer

PyQt5 Text Color in Dictionary Iteration

I've searched for a while now and can't seem to find a good answer to the question of how best to handle font colors in PyQt5. What I've found are large stylesheets with many, many options. It seems unwieldy, but maybe that's just QT. Say I have…
SomeClown
  • 13
  • 4
1
vote
1 answer

Create hyperlinks from urls in text file using QTextBrowser

I have a text file with some basic text: For more information on this topic, go to (http://moreInfo.com) This tool is available from (https://www.someWebsite.co.uk) Contacts (https://www.contacts.net) I would like the urls to show up as hyperlinks…
Joseph
  • 586
  • 1
  • 13
  • 32
1
vote
1 answer

How to Pack with PyQt - how to make QFrame/Layout adapt to content

I am building a grid of QTextEdit with HTML Subset to show some data within an interface in PyQt. At the moment I get the GridLayout and the QFrame that contains it doing whatever they want and there is no way for me to make them fit the QTextEdit…
user3755529
  • 1,050
  • 1
  • 10
  • 30
1
vote
1 answer

why QIterator object behave differently for same folder placed in two different locations?

I have a folder inside which i have following folder(s)/file(s) (Folder in bold) 1.make_file_example 1.1.main.cpp 1.2.MakeFile 1.3.message.cpp 1.4.message.h 2.makeFileExample.txt 3.other_sources.txt 4.QTnotes.txt [I've…
1
vote
2 answers

Adding ability to insert hyperlinks to a QTextBrowser

I've been assembling a text editor based on this example by Peter Goldsborough. The text box is populated from an html, but displays as rich text. I've made it so users are able to click on hyperlinks already in the text box. However, I have no idea…
Grav
  • 347
  • 1
  • 2
  • 15
1
vote
1 answer

How to get QTextBrowser to always insert text at the end

I am trying to make a serial terminal program by using QTextBrowser to display incoming data from a serial port. I have set a QTimer to call the paintEvent every 100ms, and show characters on the QTextBrowser widget if anything was received on the…
Armand Jordaan
  • 348
  • 2
  • 11
1
vote
0 answers

How to deselect text in QTextBrowser

The code below creates a single QTextBrowser, fills it with 25 lines of text and finds a line 'Line of text # 0011' using view.find method which aside from finding the text selects it as well. How to deselect the text selected by .find…
alphanumeric
  • 17,967
  • 64
  • 244
  • 392
1
vote
1 answer

How to to center selected text in QTextBrowser

The code posted below creates QTextBrowser window filling it with 100 lines of text: starting from MESSAGE-0000 all the way to MESSAGE-0099 from PyQt4 import QtCore, QtGui app=QtGui.QApplication([]) textBrowser = QtGui.QTextBrowser() for i in…
alphanumeric
  • 17,967
  • 64
  • 244
  • 392
1
vote
0 answers

html text not displaying in QTextBrowser (PyQt)

I've written a simple browser program that displays html content in a QTextBrowser. In that html content I have a hyperlink and I want the hyperlink to open a different page (displaying the html content received from the server). So basically after…
neziy
  • 93
  • 11
1
vote
1 answer

pyqt Qtextbrowser update

def sort_domain(): if self.cb1.isChecked(): for line in f: line= line.strip() if line.endswith('.com') is True: self.textBrowser.append(line) else: pass elif not…
drop22
  • 11
  • 4