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

How do I set Text Colour in QTextBrowser (Html)?? (PyQt)

I am trying to set a font colour for Html text in a created QTextBrowser. I've used basic Html Commands to set paragraphs, change font size etc. but when it comes to setting font colour, it doesn't seem to work? The code that I used is shown…
Hamzah Akhtar
  • 525
  • 5
  • 13
  • 24
2
votes
2 answers

How to have a QTextBrowser to display contents of a QTextEdit?

I am trying to connect QTextEdit to QTextBrowser, so the text browser widget outputs what is entered in text edit widget. As a signal I used textChanged(), and as a slot I used setText(QString). And these two don't have same parameters. If I used…
xpg94
  • 495
  • 1
  • 10
  • 26
2
votes
1 answer

PySide/PyQt: Is it possible to make strings that you attach to the QTextBrowser separate clickable units

This might be a silly question but: When you append a given string to a QTextBrowser object, can you make it a link to a signal to a function that takes its text and does something with it? All I need is for it to save the text to a variable…
UrbKr
  • 621
  • 2
  • 11
  • 27
2
votes
1 answer

QT: How to expand/collapse text on click event (qtextbrowser, qwebview, ...)

I have to display a large amount of text in a python/QT UI. This text represents a pattern sent by a tester (digital signals). exemple: // Command 1 0x002045A85 0x002045A84 0x002045A83 ... // Command 2 0x002045A85 0x002045A84 0x002045A83 ... I…
Ben
  • 21
  • 1
1
vote
1 answer

Link to a line in a QTextBrowser

I'm trying to make an advanced find system. What i'm trying to do is to display in a QTextBrowser the line where the string that you're searching for and make it clickable. And for when you click it, it redirects you to that line. How would this be…
Kazuma
  • 1,371
  • 6
  • 19
  • 33
1
vote
0 answers

QTextBrowser Resizing on a QGridLayout

I have a QGridLayout which contains all the layout for my class. Until there everything goes fine. I added a QSplitter for other things and then at the bottom (After the splitter) i want the QTextBrowser to be. Fine, works. But i want to resize, i…
Kazuma
  • 1,371
  • 6
  • 19
  • 33
1
vote
1 answer

QTextbrowser Scroll through text whilst new text is still being added

I have a QTextBrowser widget and I'm adding text to this widget like QTextBrowser m_outputLog; ... void MainWindow::readStdout() { if (m_running) { QByteArray data = m_runProcess->readAllStandardOutput(); QString text =…
albert
  • 8,285
  • 3
  • 19
  • 32
1
vote
1 answer

How can I erase the last lines in a QTextBrowser?

As I cannot write whole code here, I simplified it with the same problem. The simplified program is python code connected with a ui file, which is: MainWindow
1
vote
0 answers

QTextBrowser scrollToAnchor call not scrolling properly

I'm having trouble getting QTextBrowser.scrollToAnchor to scroll properly. The on_anchorClicked signal is firing, but I'm having difficulties determining what's going wrong after that. I've double checked that my markdown file anchors are correctly…
wliu
  • 11
  • 1
1
vote
1 answer

PyQt5 - How to display a clickable hyperlink in QTextBrowser

I have created a GUI with PyQt5. Now I would like to add hyperlinks to a QTextBrowser. Unfortunately, the texts are not clickable but instead displayed as normal text and I have a hard time finding out why. import sys from PyQt5.QtWidgets import…
mawexi
  • 13
  • 3
1
vote
1 answer

how to print continous data on pyqt5 text browser

I have created a manual web socket and I stucked. Query) How to print continous/real time data receiving from server on text browser in pyqt5 GUI if connect (here name close) pushbutton is pressed (connection created) and if pushbutton is pressed…
1
vote
1 answer

Python PyQt5 All text in QTextBrowser becomes 'hyperactive'

I have a problem with text in QTextBrowser. I have a similar code: from PyQt5.QtWidgets import * from PyQt5.QtCore import * from PyQt5.QtGui import * from PyQt5.QtCore import * class MainWindow(QMainWindow): def __init__(self, parent=None): …
1
vote
1 answer

Insert blob image into QPixMap from sqlite db to QTextBrowser in PyQt5

I can't insert qpixmap image to qtextbrowser with html tags. (I need to insert with html not other methods) I tried the code below. def readImage(self): cur = self.db.cursor() covers = cur.execute("select cover from covers") …
user2445398
  • 34
  • 1
  • 10
1
vote
1 answer

How do I connect ComboBox and TextBrowser using PushButton-Qt?

I make a program that reads a file. I have a combobox that reads lines numbers: 1,6,11,..etc. I want to e.g. read lines 1-5 when line number 1 is choosen in combobox and push button is clicked (or read lines 6-10 when line 6 is choosen, end so on).…
1
vote
2 answers

How do I load/display an html file into my QTextBrowser widget?

I'm teaching myself how to code UI in python with PyQt5. One of the things I want to do is take an html document saved in the same folder as my app and display its contents. It looked like QTextBrowser was the proper widget to load/display html…
wooloop
  • 41
  • 1
  • 7
1 2
3
9 10