Qt6 bindings for Python programming language. This allows programmers to make Qt6 graphical user interfaces using Python syntax.
Questions tagged [pyqt6]
739 questions
-1
votes
1 answer
Converting a QTreeWidget to a nested dictionary in PyQt
The reason I want to do this is to allow the user to create a file tree using a QTreeWidget, then I want to extract that tree in to a nested dict structure, and save it some how. I've thought about using a txt file and eval aproach to simply load…

Christopher
- 41
- 8
-1
votes
1 answer
Button doesn't show up
i'm trying to do a simple GUI for a python script that convert some text into a specific format but buttons doesn't show up in the window.
I first create the button class
class Button(QPushButton):
def __init__(self, btn_name=None):
…

Pantuflis
- 11
- 1
- 4
-1
votes
1 answer
How can I filter an ms-access databse, using QSqlTableModel and QLineEdit?
I'm building a GUI that allows users to search information in a ms access database
(yup. It has to be the ms access)
The user has a textfield where he can type his search
and the Tableview should update instantly.
At the moment the DB disappears…

Nullschall
- 11
- 6
-2
votes
0 answers
PyQt5/6: Read file and then display at PlainText. now i am searching for the letter occurrence in text, that how many occur
def file_open(self):
fname, _ = QFileDialog.getOpenFileName(self, 'Open', 'Desktop', 'Text documents (.txt);;Word documents (.docx)')
self.setWindowTitle(fname)
with open(fname, 'r') as f:
if fname.endswith('.txt'):
fileText =…
-2
votes
1 answer
How can I extract the string from my signal?
As I read in the documentation you can not return anythong from slots in pyqt, so then I decided to emit a signal from my slot but the problem is the signal is an object but I need the string of that object to put it to use.
first, Am I right about…

Extremist
- 3
- 2
-2
votes
1 answer
How to change QComboBox items in list in PyQt6
I have a PyQt6 GUI created with QT Designer
I load the GUI .ui file into python as follows:
class UI(QMainWindow):
def __init__(self):
super().__init__()
self.threadpool = QThreadPool()
# loading the ui file with uic…

OK Tech
- 1
- 1
-2
votes
1 answer
How can I solve the error "TypeError: can only concatenate str (not "numpy.float64") to str" trying to output the correlation
I'm starting in Python and I'm trying to output in a QPlainTextEdit the Pearson's, Spearman's and Kendall's correlation using the function "print_correlation_results". But when I try to do it, I get this error, how can I solve it?
CORRELATION
def…

JorgeDelo
- 3
- 2
-2
votes
1 answer
PyQT object unintentionally appearing in separate window
I think I'm a bit tired and probably missing the obvious, so please, go easy on me ;)
I'm trying to troubleshoot an issue, my custom QPushButton class object is being displayed in a separate window (see attached image). If I implement the button via…

Ian Thompson
- 3
- 1
-2
votes
1 answer
How to transfer QLineEdit value into console?
Assume we have an interface with Buttons and LineEdits in one .py file. I have this code in another, which inherits it:
import Inter_Input_Blasting as interf
from PyQt6 import QtCore,QtWidgets,QtGui
from functools import partial
class…

Addm1X
- 27
- 7
-3
votes
1 answer
New way of dark mode in PyQt6/PySide6
There is 'old' way of setting dark mode in PyQt6/Pyside6 answered here: How do I use QT6 Dark Theme with PySide6?
But I found official Qt blog post https://www.qt.io/blog/dark-mode-on-windows-11-with-qt-6.5 and I not sure how to applied 'new' way…

emcek
- 459
- 1
- 6
- 17
-3
votes
1 answer
AttributeError: 'bool' object has no attribute 'specificaccount_radiobutton'
When I run this code, I get an error stating that : AttributeError: 'bool' object has no attribute 'specificaccount_radiobutton'
from PySide6.QtWidgets import (QGroupBox, QGridLayout, QLabel, QRadioButton,
QComboBox,…

relu
- 11
- 2
-3
votes
1 answer
Double addition function, how to fix
I have a big problem with a part of my code:
the function below, it adds the values of the price column and the quantity column to extract the total amount of the order. But the price column is doubling the value and I can't find the error.
I've…

PeakyBlinder
- 3
- 3
-4
votes
1 answer
Pyqt5 QWidget.show() Not Working On Other Thread
Look There Are My Qwidget Object And If I Am Working This Object On Main Thread No Problem Qwidget .show is Working but
If I Run On Other Thread(threading.Thread) program freezes and shuts down.
WHAT CAN I DO ?