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

QTextBrowser doesnt update with append, when calling this function from another class

Hello I have two function. One Class is a watchdog and the other class is a pyqt gui. I have three QTextBrowser. If I connect a button to the function in the QT Class and call the function my TextBrowser get updated normally. If I trigger an event…
0
votes
0 answers

Pyqt5 multiple widgets

I want to create a pyqt5 application of which, I want to track every button click in the qtextbrowser. To make it simple to see and also to understand, I want to import different qwidgets to a qmainwindow and build the QMainwindow application in the…
Sree
  • 11
  • 1
0
votes
0 answers

AttributeError: 'QTextBrowser' object has no attribute 'setFrame'

What is wrong in the code? I am new to QtPy6 and trying to make a vritual book with it. import sys from PyQt6.QtWidgets import QApplication, QMainWindow, QTextBrowser, QFrame, QLineEdit, QPushButton class Book(QMainWindow): def __init__(self): …
0
votes
1 answer

In PySside2, how can I show the thumbnail for an item in QtextBrowser when the user hovers it?

Now I have a plan. That is dragging files to QttextBrowser. When the mouse hovers over the path URL, the thumbnail will display to the right in QttextBrowser. But even after consulting two Stack Overflow questions, I couldn’t achieve it: In PyQt5's…
Good-boy
  • 3
  • 6
0
votes
0 answers

How to write text from QTextBrowser to csv?

I extracted text from a QTextBrowser and now I want to save this as csv. But each letter is saved in each row in the csv file. How can I get each line of the text to print in each row. The text looks like this: 'Input data\nEnergy (kWh):…
jim
  • 63
  • 7
0
votes
1 answer

PyQt5 - Display lines from script

I'm new in pyqt5 and I'm working on a gui that runs tasks from a txt file (each line is a task) and I have 8 QTextBrowser's ,i want to display each line into a QTextBrowser (for example the first line will be shown in the first QTextBrowser, the…
user19324223
0
votes
2 answers

About QT5 Qprocess output in Ubuntu

I use QT to call external programs under Ubuntu and put the output on textbrowser. However, because the external programs I want to call have colors in the shell output, the output of textbrowser is mixed with color codes. How can I remove…
CC YAN
  • 1
0
votes
0 answers

Python PyQt5 Qtextbrowser Serial Terminal Overwrite Time Loop on the same line

This is what my devices print out on the terminal while waiting for commands(ser.write) I am writing a simple PYQT5 terminal in python to display information on a terminal from a connected device using Qserial. The output from the connected device…
0
votes
2 answers

How do I find the position in the document that is visible in a QTextBrowser?

When the user scrolls in a QTextBrowser in my application, I want to retrieve the position in the document that they've scrolled to (offset in the document, not the GUI position.) If I can make the cursor jump to that location, I can get…
0
votes
0 answers

Syncing text selector and font in custom QTextBrowser

I am trying to build the basic function in a text editor where the font-selector box is automatically updated when you click on a new chunk of text, so that it reflects the current font of that text. (Minimal code posted below.) I've succeeded in…
Grav
  • 347
  • 1
  • 2
  • 15
0
votes
1 answer

Create tabs dynamically and add QTextbrowser to them: First tab is missing the QTextbrowser

The code below creates a number of tabs (from "howmuchtab"s value) in a QTabWidget when clicking pushbutton. Each tab contains a QTextBrowser. I want to refresh the tabs each time the PushButton is clicked. Problem is: when clicking "Create Tabs"…
luc
  • 1
  • 1
0
votes
0 answers

Best way to bring stdout (progressbar) to QTextBrowser

I have a working progressbar in the terminal that I wrote from a tutorial. Now I am wondering if it is possible to get this into the GUI qttextbrowser as ouput?. Does somebody has any idea? thanks for your help! Hier die progressbar: class…
nicBit
  • 63
  • 1
  • 2
  • 8
0
votes
1 answer

When I click QPushButton, I want to change QTextBrowser's text

My Code has 2 problems. I want QPushButton is upper than QTextBrowser. But, I can't. You can check image. . When I click QPushButton, I want to change QTextBrowser's Text. But, I has an error. -> Error message: 'MyApp' object has no attribute…
Yoon
  • 1
0
votes
0 answers

How to select text from QTextBrowser and move it to another QTextBrowser object on a button click?

[Ques_code][1] I need to move text from Text Browser playerDataBox to teamDataBox when the button is clicked. How do I do that? I've tried the following: def addToTeamPushButtonclicked(self): print("HAHA you clicked") …
Atul Gupta
  • 11
  • 5
0
votes
1 answer

Check if user clicked bolded text in QTextBrowser?

I'm making an app that shows lyrics for songs from Genius.com website and now I'm implementing a feature that lets user see the annotations for the lyrics as well but I don't know how to check if the user clicked the annotation in my QTextBrowser…
Kiren78
  • 55
  • 9