Qt6 bindings for Python programming language. This allows programmers to make Qt6 graphical user interfaces using Python syntax.
Questions tagged [pyqt6]
739 questions
0
votes
1 answer
argument 1 has unexpected type 'EnumMeta'
I am trying to display a simple GUI
# Form implementation generated from reading ui file 'UI/form.ui'
# Created by: PyQt6 UI code generator 6.1.0
# WARNING: Any manual changes made to this file will be lost when pyuic6
# is run again. Do not edit…

Derek Neilson
- 11
- 4
0
votes
1 answer
QtCharts in qml with pyqt6 in Visual Studio Code
I want show charts in my app with Python back-end and qml front-end but I got an error.
Import:
import QtCharts 2.3
Error:
module "QtCharts" is not installed
I installed qtcharts with maintaince.exe
How to solve this?

user17312099
- 11
- 1
- 3
0
votes
1 answer
PyQt6: app shows permanetly Gnome taskbar
Running a simple PyQt6 app Gnome desktop environment shows the taskbar permanently:
OS information:
Distributor ID: Kali
Description: Kali GNU/Linux
Rolling Release: 2021.3
Codename: kali-rolling
Code:
import sys
from PyQt6.QtWidgets import…

Lorenzo Lerate
- 3,552
- 3
- 26
- 25
0
votes
0 answers
How to add padding between the combobox header and items
So I have a QComboBox and I want to add some padding between the top bar and the items. Here is the code:
from PyQt6.QtWidgets import QComboBox
class DropDown(QComboBox):
def __init__(self , parent):
super().__init__(parent)
…

BladeOfLightX
- 504
- 4
- 17
0
votes
1 answer
How to reset a bulleted list to normal text and back in QTextEdit
I am trying to set the selected lines to bullet points and back, here i set the indent to 0, it destroys the bullet points, yet the list property remains true, so this code will not set the same line back to bullet list again, how to clear the…

Jack Zero
- 77
- 6
0
votes
0 answers
How to prevent from QGraphicsItem from collide with each other
I am making an app that has a graphic scene where you can drag items in and move them in the scene.
I am trying to prevent collusion between items in the scene and saw this question Prohibit collision of a movable QGraphicsItem with other items…

Ron lisnyansky
- 36
- 3
0
votes
1 answer
How can I get QLineSeries name of graph when mouse horvers in pyqt?
In this picture name of blue line is Week 1 but it displayed as Week 2.
This is my python code.(I used pyqt6.)
for ls_Series in li_Points:
self.ob_Chart_Viewer.chart.addSeries(ls_Series)
name = ls_Series.name()
…

bituniverse
- 98
- 11
0
votes
1 answer
How can I add zero value axis in pyqt charts?
I'm trying add zero value axis in chart by using pyqt.
This picture shows graph plotted by pyqt6 charts:
In the above graph, there is no zero value in axis-y.
How can I show zero value?
This is my code for…

bituniverse
- 98
- 11
0
votes
0 answers
Adding radius to table borders in QTextDocument
I was tinkering with Qt's richtext HTML subset. I wanted to add a rounded border on a html table to use with QTextDocument.setHtml() method in QT. But the documentation does not have a "border-radius" property.
Does anyone have suggestions on…

lymphatic
- 91
- 1
- 6
0
votes
1 answer
Playing sounds with PyQt6
As the PyQt6 module has been released, I have started porting my code from PyQt5 to PyQt6.
In PyQt, there was a module called phonon which was used to play sounds.
In PyQt5, there was a module called QMediaPlayer which was then used to play…

BladeOfLightX
- 504
- 4
- 17
0
votes
0 answers
Centering a line of widgets in a QGridLAyout
I am trying to centre a line of widgets in a QGridLayout using pyqt6. I have the widgets in the line and the first few are not made any bigger than the default, but the last one I would like to have made bigger as it's the most important box that is…

ProgramMasher
- 53
- 8
0
votes
0 answers
Is there a way to make QSettings generated ini files read only?
This is more of a conceptual question than a coding question. I was wondering if there is a way to make an ini file generated by QSettings read-only? I want to limit the user’s ability to edit the contents of an ini file and then import incorrect…

Gillian Grace
- 31
- 7
0
votes
0 answers
How to enable IniFormat in QSettings using PyQt6?
I am trying to save my application settings to an INI file using QSettings; however, I keep getting this error: AttributeError: type object 'QSettings' has no attribute 'IniFormat'.
Here is my code:
home_dir = str(Path.home())
self.fileConfig =…

Gillian Grace
- 31
- 7
0
votes
1 answer
Icon does not appear in QTableWidget
I'm making a clipboard that can save multiple items. My clipboard using QClipboard can store text, file paths and images. When you copy something it is shown in a QTableWidget but there is a problem with images. I want to show them in small size as…

Deator
- 5
- 3
0
votes
0 answers
How to stop a layout in a frame from resizing when the size of the frame changes?
I have a frame that expands and shrinks when you click on it. It has 2 Layouts. One layout should be visible whenever the layout is expanded (the content layout), and the other one is supposed to be always visible, even when the frame is shrunken…

Mergen Studios
- 70
- 1
- 7