Questions tagged [pyqt6]

Qt6 bindings for Python programming language. This allows programmers to make Qt6 graphical user interfaces using Python syntax.

739 questions
1
vote
1 answer

Connecting multiple checkboxes using a lambda function in python

A little background. I'm writing some code to manage the creation of index entries in LaTeX. A LaTeX index entry can have up to three levels (main heading, sub-heading, sub-sub-heading). The text at each level and the page number for the entry can…
Don H
  • 11
  • 3
1
vote
0 answers

How to properly implement if the cursor is hovered over QGroupBox to do something?

import sys from PySide6.QtWidgets import ( QApplication, QWidget, QVBoxLayout, QGridLayout, QGroupBox ) class EmailBox(QWidget): def __init__(self) -> None: super().__init__() self._emailbox_layout =…
relu
  • 11
  • 2
1
vote
0 answers

How to make QListView::item:first and QListView::item:last with round corners

I've tried to make QMenu and QComboBox item's corners rounded. And i have a result. But i can't force only first and last items become rounded. So, it should look like this: . But with this code below i can only round all items. I've tried to call…
Mika
  • 51
  • 4
1
vote
1 answer

PyQt6 pyinstaller app builds but wont open MacOS (M1 chip)

I am trying to make a python desktop app with PyQt6. I want to make it into a clickable app by using pyinstaller but I get a "app closed unexpectedly" error when I try to run the app from finder. Equally I cant run the app from terminal either but…
mrw
  • 142
  • 5
1
vote
1 answer

how to place the values for the open, high, low, close and volume in a legend when the house hovers a certain date

I am trying to create a candlestick chart using finplot and embedding it in a gui using pyqt6. I have multiple csv files in a folder with the following columns: dt, open, high, low, close, and volume. Each csv file is named with the stock symbol(for…
moj
  • 11
  • 2
1
vote
0 answers

PyQt multithread application hanging

I have a simple GUI app running using PyQt6 When I start the application i create 4 threads, each one executing a different task in an infinite loop. I create a list of threads to manage them easily. def create_threads(self): self.threads,…
Gino_P
  • 74
  • 7
1
vote
0 answers

Can't record audio in mp3 or wav format using PyQt6.QtMultimedia.QMediaRecorder

I need a voice recorder as part of the program. Below is the test part for voice recorder import os import sys from PyQt6.QtMultimedia import QMediaRecorder, QMediaCaptureSession, QAudioInput, QMediaFormat from PyQt6.QtWidgets import QMainWindow,…
1
vote
1 answer

Debug Pyqt with PyCharm

I'm using PyCharm and running a script using the PyQt6 library. I'd like to know if it's possible to access properties like QLabel.text() or QLabel.isEnabled() while debugging? I want to see what's inside my QWidget, its state... All I can see are…
1
vote
0 answers

Python PyQt6 execute process as root

I'm trying to run my Qt application as root on Linux. import os import sys from PyQt6.QtWidgets import QApplication from gui.gui import MainUI if __name__ == '__main__': if os.getuid() != 0: args = ['pkexec'] + [sys.executable] +…
malonn
  • 59
  • 1
  • 7
1
vote
0 answers

PyQt6 crashes with QBitmap()

from PyQt6 import QtGui as qg bitmap = qg.QBitmap(800, 600) crashes with Error message: QPixmap: Must construct a QGuiApplication before a QPixmap I want to setup a QMainWindow with two layers. The lower level should be a QImage and the top layer…
CKP
  • 31
  • 1
  • 4
1
vote
0 answers

What might cause an HTML file that displays properly in a chromium to show nothing when displayed in a PyQt6 QWebEngineView?

I'm making a python GUI using PyQt6 that I would like to include a google maps widget in. However, I can't get the maps API to display in the QWebEngineView. I copied some JavaScript code from…
1
vote
3 answers

My code run very very slow. How can I make my python code that runs faster?

please help me. I wrote a program to run "Game of Life" with PyQt6 but, it runs very very slow. How can I make it faster? What about using multiple cores of the CPU? How can a Python program run on multiple cores? What about doing display stuff…
DSA5252
  • 35
  • 6
1
vote
0 answers

Signal/Slot problem with PySide6 (but not with PyQt6)

Consider the following code where clicking a button is closing the parent window. Using PyQt6, the parent window of the button clicked is closed. But with PySide6, the window 1 is always closed, whatever the button clicked. I cannot figure out what…
kleio12345
  • 13
  • 3
1
vote
1 answer

How do you play an audio file with a non-ASCII file name in Python QT?

I haven't worked with python in a while so excuse me if I made some obvious mistake. I am creating an application in QT with Python (PySide6) where a list of words is displayed, and the user can select a word from the list and hear the audio of that…
123theone
  • 43
  • 1
  • 4
1
vote
0 answers

How can I set QTreeView's current index to a specific value in PyQt6 or PySide6?

i use this offical example https://doc.qt.io/qtforpython-6/examples/example_widgets_itemviews_jsonmodel.html then i want to make vaule be clicked in QTreeView by a specific value。like this enter image description here maybe it means update…
UnderHeart
  • 11
  • 1