Qt6 bindings for Python programming language. This allows programmers to make Qt6 graphical user interfaces using Python syntax.
Questions tagged [pyqt6]
739 questions
2
votes
0 answers
I want to save the result of the model.predict() function in pixmap
I'm trying to recognize images. I use PyQt6 for my gui. Here is part of my code:
FileModelPath = os.path.join(os.path.dirname(os.path.abspath(__file__)), "WorkFile\\best.pt")
model = YOLO(FileModelPath)
img =…

Aleksandr Eremin
- 21
- 2
2
votes
1 answer
PyQt6 inner half of the polygon border does not trigger hover event
I am trying to create polygon with a border and change its color when mouse cursor is on top of it. The problem appear when I create more than one polygon and set a border size grater than 4. The first polygon behaves correctly but for other it…

Michal
- 23
- 2
2
votes
0 answers
ICE connection is stuck on checking and PeerConnection ConnectionState is stuck on connecting in Python Linux desktop application
I am currently working on a video calling application for Linux desktops. To establish peer-to-peer connections, I have used aiortc for RTC connections and utilized WebSockets for handling offer, answer, candidate, and message data transactions.…

Pavan V Parekh
- 1,906
- 2
- 19
- 36
2
votes
0 answers
Delete key and Backspace key not activating keyPressEvent in PyQt6
So in my program, the function keyPressEvent is not activating (its not entering the function block) for delete and backspace keys until I actually tap any button from the GUI. Suppose the function contains this:
def keyPressEvent(self, event):
…

Ankur Mallick
- 21
- 4
2
votes
1 answer
How to get feedback from ComboBoxes created in a loop
I am trying to feed an unspecified number of comboboxes to a user. Once the user selects inputs for the combo boxes I want to be able to print out those combobox inputs after the submit button is clicked. Currently I can only print the last one…

iceAtNight7
- 194
- 1
- 2
- 10
2
votes
1 answer
How to disable QWebEngineView logging with webEngineContextLog?
I'm using a QWebEngineView in my application.
After upgrading to PyQt6 it has started to output the logging information shown below.
How can I disable these messages?
I have found the code that is emitting them here: logContext
It looks like I have…

dukeeloo
- 161
- 7
2
votes
2 answers
QtMultimedia is not currently supported on this platform or compiler. PyInstaller
I'm using PyInstaller v5.6.2. I prescribe pyinstaller mp3pyqt6.py, after which I add the necessary files to mp3pyqt6.spec, updating the pyinstaller mp3pyqt6.spec command. The console that comes with the application says: could not load multimedia…

Michael
- 23
- 3
2
votes
1 answer
pyQt6 + asyncio: connect an async function as a slot
I've got a situation where I would like to connect an async function that uses awaits to the clicked signal of a QPushButton.
The motivation is that I need to manage some io-bound stuff and using awaits seems to be the most cogent way to do that.…

Angelo
- 2,936
- 5
- 29
- 44
2
votes
1 answer
Getting extremely confusing error even though all code seems to be okay, with correct syntax
getting extremely confusing error even though all code seems to be okay, with correct syntax. Any help? Im pretty new to programming and Im getting this error when I run it, (Im using reple.it btw):
Traceback (most recent call last):
File…

TurnipYossarian
- 87
- 5
2
votes
0 answers
libQt6Core.so.6 import error for Qt6 on Ubuntu 22.04 python3.10
Updated to Ubuntu 22.04 yesterday. I cannot use PyQt6 on Ubuntu 22.04 using python3.10.
PyQt6-Qt6 6.3.1 is installed.
File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File…

Colin Curtain
- 217
- 1
- 10
2
votes
0 answers
Change "No Internet" screen on PyQt6 Browser
Is there a way to change this screen and the others in PyQt6 browser?

N6T5
- 21
- 1
2
votes
1 answer
PySide6: AlignCenter not working for QAbstractTableModel's TextAlignmentRole
The data in the table cells is not centering. It used to before but now all of a sudden it doesn't anymore, and I don't know why. I have not changed anything in the model class.
I have code similar to this MRE:
from PySide6 import QtWidgets as…

オパラ
- 317
- 2
- 10
2
votes
1 answer
PyQt6 Updated Frameless Draggable Window
I Haven't yet seen an updated version of the code for PyQt6, so i'm posting the snippet here
def center(self):
qr = self.frameGeometry()
cp = self.screen().availableGeometry().center()
qr.moveCenter(cp)
…

Myra
- 31
- 3
2
votes
0 answers
ERROR: Could not find a version that satisfies the requirement PyQt6-Qt6>=6.3.0 (from pyqt6) (from versions: none)
I have not managed to install PyQt6 in a few days to this error message:
ERROR: Could not find a version that satisfies the requirement PyQt6-Qt6>=6.3.0 (from pyqt6) (from versions: none)
It happens when I install like this:
python -m pip install…

Valeria
- 1,508
- 4
- 20
- 44
2
votes
1 answer
Qt.CheckState.Checked != 2 and Qt.CheckState.Checked != 0
The PyQt6 documentation says that Qt.CheckState.Unchecked == 0 and Qt.CheckState.Checked == 2.
I wrote a little program to test this, but the result is completely different.
Here is the program code:
from PyQt6.QtCore import Qt
from PyQt6.QtWidgets…
user18196171