Category "pyqt"

PyQt6 QMediaPlayer and QAudioOutput not behaving as expected

I've been having an issue migrating to PyQt6 with QAudioOutput and QMediaPlayer where the QMediaPlayer object seems to not work with any QAudioOutput I make. If

Connect arrays of buttons in QT Designer

so I have a mass of buttons on a QT Designer GUI application all named LED_i where i ranges from 0-191, ie: LED_0, LED_1, ..., LED_191. I would like basically t

how to change word wrap mode for QListView?

I created a QComboBox and set a custom view for it: self.list_view = QListView() self.list_view.setWordWrap(True) self.list_view.setVerticalScrollBarPolicy(Qt.S

PyQT customizing specific ScrollBar

I would like to apply different colors to my scrollbars depending on their parent QListView, and I would like to do this from "higher level" than the QListView

QTimer format converting

I have this code: from PyQt5 import QtCore, QtGui, QtWidgets from PyQt5.QtCore import Qt, QTimer import sys class Ui_Timer15(object): def setupUi(self, Ti

PyQT5 and OpenCv2 loading images incorrectly when refreshing

In a nutshell, I currently am trying to load a picture and view it using pyqt5, via QtWidgets.QGraphicsScene. However, after loading the picture, I run some ope

How to implement snap grid with cross cursor in pyqt?

I want to draw a snap grid like the picture as bellow,I can draw the background point, but I don't know how to snap the grid point while mouse moving,Could her

PyQT how to change layouts size

I am trying to make a GUI that is very similar to Spotify using PyQT I've already designed the main window and I am struggling with applying the design to QT Cr

PyQt 6: Are there any classes with signals that emit when the device connects/disconnects to/from the internet?

I'm adding a download function to an application that I'm creating. When the user's device's internet connection is lost during a download, I want the download

Why do rebound methods of PyQt classes raise a TypeError

Making my code compatible with PyQt5/6 and PySide2/6, I wrote if not hasattr(QtCore.QDateTime, 'toPython'): # fix for PyQt5/6 QtCore.QDateTime.toPython = Q

pyqt - How to make path of selected folder open in window?

How can I make the path of the selected folder open in the browser window as shown in the picture below? def open(self): current_item = self.treewidget.sel

Method to stop QThread that calls OpenCV functions

I have a simple PyQT application which, on press of a "calculate" button calls a long-running function that performs some image processing using OpenCV. To allo

open file (e.g. right click/ open with) event for python3 script on a mac

I would like my python3 script to react to an open file event. Is there any way to achieve that? The following python3 script is named example #!/path/to/python

pyqt is not showing my progress bar but it is taking the time to go through it [duplicate]

I have a set of functions that when they run can take a few minutes to finish. I want to display a progress bar while they are running. I have

How to use QTest.keySequence?

I'm trying to test if a shortcut is working using PyQt5 and QTest. Here is my code: Main.py from PyQt5.QtGui import QKeySequence from PyQt5.QtWidgets import QWi

Why won't my new layout be displayed dynamically on my GUI ? Python - PyQt

I'm trying to print some text in a new layout when a button is pressed. Unfortunately if won't work and I can't find the problem to solve it. Thank you for your

I wonder why pyqtSignal() is used. (pyqt, QThread, signal, slot)

This is the test code about QThread and Signal. from PyQt5.QtWidgets import * from PyQt5.QtCore import * import time import sys class Thread1(QThread): se

The window i made with qt designer doesn't show up

I made this window using qt designer i did not add the code that downloads the songs yet but when I run it the window doest show up from PyQt5 import QtCore, Qt

PyQt6/PySide6: QStackedLayout aligns the size of nested widgets

I created a QStacedLayout and nested 2 widgets in it. However, as I understand it, if one widget is larger than the other, then QStackedLayout seems to be tryin

Qt allow dock widget to overlay

How could I allow a dock widget to be over other widgets? I would like to get a result like the tool bar of a IDE such as VSC or PyCharm. The bar can be resized