Questions tagged [pyqt5]

Qt 5 bindings for Python programming. This allows programmer to make Qt 5 graphical user interfaces using Python syntax.

Qt 5 bindings for Python programming language. This allows programmer to make Qt 5 graphical user interfaces using Python syntax.

14659 questions
2
votes
2 answers

What's wrong with this lambda (maybe something to do with PyQt?)

I connected three buttons to a function which takes an argument and simply prints it. The buttons pass the argument in cosmetically different ways, as you can see in the MWE below, though as I far as I know there isn't any semantic difference. from…
gil
  • 2,086
  • 12
  • 13
2
votes
0 answers

How to make the zeros coincide in a PyQtGraph?

I have 3 axes (left, bottom, right) and I can't find a way for the zeros to all be on the bottom left (see figure) please advise? Here's part of my code: grid = QtWidgets.QGridLayout(self.Envtab) grid.setSpacing(10) plotWidget =…
Alexis R Devitre
  • 288
  • 2
  • 6
  • 21
2
votes
1 answer

find parent of mousepress event of multiple randomly created widgets(like QLabel,QPushButton etc.) in PyQt5

I have created multiple QLabels using for loop with same variables.Now i need to know that from where/which Lable,MousePress event is triggered.Is there any way like event.parent() OR event.widget() I also tried installEventFilter but its not…
Rajkumar
  • 530
  • 4
  • 9
2
votes
1 answer

PyQt5: set coordinates for items in graphics scene

I have a scene = QGraphicsScene() and I added an ellipse via scene.addEllipse(100, 100, 10, 10, greenPen, greenBrush). The brush and the pen are set before. I add the QGraphicsScene right after to a QGraphicsView with MyGraphicsView.setScene(scene).…
Cpt. Crazy
  • 115
  • 1
  • 11
2
votes
1 answer

TypeError: QPixmap(): argument 1 has unexpected type 'Figure'

I'm trying to make a graph using matplotlib and plot it directly in a Qlabel using Qpixmap. However, the error QPixmap () is happening: argument 1 has unexpected type 'Figure'. How do I display the graph without saving it before? import…
LucasRussi
  • 23
  • 5
2
votes
2 answers

Is there any way to make mouse events completely ignore windows in PyQt5?

I have tried to use setAttribute(Qt.Qt.WA_TransparentForMouseEvents),but mouse also can't pierce through Qtwindow. I want make mouse event penetrate Qtwindow,like I have clicked mouse's right button at a Qtwindow which is located in Windows10…
injoker1
  • 163
  • 10
2
votes
0 answers

What could be causing exit code 3221225477 with Python and OpenGL?

I have a script that I can confirm runs on other people's computers, but not on mine. Instead, it gives this error code: [Finished in 6.1s with exit code 3221225477] [shell_cmd: python -u "D:\PythonProjects\ClimatesProject\OpenGlTest.py"] [dir:…
Drickken
  • 47
  • 8
2
votes
1 answer

PyQt5 QSortFilterProxyModel Sort Column by appropriate data type (int, float, datetime, string, etc)

I wrap a QAbstractTableModel instance in a QSortFilterProxyModel in order to be able to sort and filter it. Sort requests sort column data as strings - instead I want the columns to be sortable by their appropriate datatype. There are a handful of…
10mjg
  • 573
  • 1
  • 6
  • 18
2
votes
0 answers

py2app "/usr/lib/libstdc++.6.dylib: No such file or directory" error

When I was building LDOCE5 Viewer on macOS Big Sur with the command sudo DISTUTILS_DEBUG=1 python3 setup.py py2app, the output printed this error: copying file /usr/lib/libstdc++.6.dylib ->…
2
votes
1 answer

How to run Qthread one after another without freezing UI?

How to run Qthread one after another? For the following code: import sys from PyQt5 import QtCore, QtWidgets class MyWindow(QtWidgets.QMainWindow): def __init__(self): super().__init__() self.setWindowTitle('MyWindow') …
2
votes
1 answer

How To Scroll in 'QMainWindow'

I've just starting to learn/use PyQt for my internship and am having some issues finding out how to add a scroll bar to this simple program: class Window(QMainWindow): def __init__(self): super().__init__() …
mmarion
  • 859
  • 8
  • 20
2
votes
1 answer

How to connect to the QSqlDriver notification signal

How can I bind the SQLite driver notification signal to include the notification source and payload in a PyQt5 project as seen in the C++ docs from QT? As far as I can see overloading the signal with the driver[str].connect syntax will only accept…
kblst
  • 493
  • 8
  • 12
2
votes
1 answer

Resizing custom widget by dragging the edges in pyqt5

I have made a custom widget similar to QPushbutton or label. I would like to let the user resize the widget when the mouse is over the edge of the widget. How can I do this? (Note: I am not looking for Splitter window)
JacksonPro
  • 3,135
  • 2
  • 6
  • 29
2
votes
1 answer

how to suppress console output from QWebEngineView errors?

I get the following error if I create a QWebEngineView instance from Python instances in different working directories: [2452:9872:1108/052617.050:ERROR:cache_util_win.cc(21)] Unable to move the cache: Access is denied.…
pyjamas
  • 4,608
  • 5
  • 38
  • 70
2
votes
1 answer

After installing pyqt5==5.14.0, error shows as Could not load the Qt platform plugin "xcb" in "" even though it was found

I have accidentally installed pyqt5==5.14.0 for testing for pandasGUI as seen in a tutorial in my ubuntu system. However, now i am unable to plot any graphs using matplotlib as it shows error as qt.qpa.plugin: Could not load the Qt platform plugin…
Akhil
  • 39
  • 1
  • 4
1 2 3
99
100