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
67
votes
3 answers

Is there a tutorial specifically for PyQt5?

I am looking for a PyQt5 tutorial. It is rather complicated to start GUI development with Python for the first time without a tutorial. I only found some PyQt4 tutorials so far, and since something changed from Qt4 to Qt5, for example the fact…
WeGi
  • 1,908
  • 1
  • 21
  • 33
65
votes
6 answers

Python 3.7.0 No module named 'PyQt5.QtWebEngineWidgets'

I have Python 3.7.0 and I installed PyQt5 with this command: pip install PyQt5 I have returned this error: main.py", line 4, in from PyQt5.QtWebEngineWidgets import * ModuleNotFoundError: No module named…
michele
  • 26,348
  • 30
  • 111
  • 168
63
votes
14 answers

AttributeError: module 'sipbuild.api' has no attribute 'prepare_metadata_for_build_wheel' for PyQt5 5.15.0

A program I am trying to install requires the installation of PyQt5 5.15.0 , which gives me this error. The odd thing is that the installation works fine for the latest version of PyQt5 (5.15.2), but this program requires 5.15.0…
thecrispywisp
  • 631
  • 1
  • 4
  • 3
58
votes
3 answers

Should I use `app.exec()` or `app.exec_()` in my PyQt application?

I use Python 3 and PyQt5. Here's my test PyQt5 program, focus on the last 2 lines: from PyQt5.QtCore import * from PyQt5.QtWidgets import * import sys class window(QWidget): def __init__(self,parent=None): super().__init__(parent) …
socket
  • 1,153
  • 3
  • 13
  • 22
56
votes
4 answers

How to get text in QlineEdit when QpushButton is pressed in a string?

I am trying to implement a function. My code is given below. I want to get the text in lineedit with objectname 'host' in a string say 'shost' when the user clicks the pushbutton with name 'connect'. How can I do this? I tried and failed. How do I…
esafwan
  • 17,311
  • 33
  • 107
  • 166
53
votes
20 answers

PyQt5: How to install/run Qt Designer

Feeling really stupid, right now, but the title says it all: How do you start the QtDesigner? I've installed PyQt5 via pip and I believe to have identified the directory it's been installed in…
User1291
  • 7,664
  • 8
  • 51
  • 108
46
votes
6 answers

Dark theme for Qt widgets?

Background I'm building a PyQt5 application, that I'd like to have a dark theme for. Previously I've worked with Android development where there was a dark theme that I could set for a whole application Question Is there a dark theme built into Qt…
sunyata
  • 1,843
  • 5
  • 27
  • 41
46
votes
9 answers

ImportError: No module named PytQt5

following are my python, qt and sip versions root@thura:~# python -V Python 2.7.3 root@thura:~# qmake --version QMake version 3.0 Using Qt version 5.0.2 in /usr/lib/i386-linux-gnu root@thura:~# sip -V 4.15.3 I tried to import the PyQt5 by following…
Thu Ra
  • 2,013
  • 12
  • 48
  • 76
44
votes
2 answers

PyQt proper use of emit() and pyqtSignal()

I am reading through some documentation on PyQt5 to come up with a simple signal-slot mechanism. I have come to a halt due to a design consideration. Consider the following code: import sys from PyQt5.QtCore import (Qt, pyqtSignal) from…
Max
  • 2,072
  • 5
  • 26
  • 42
43
votes
1 answer

PyQt5 failing import of QtGui

I've just moved from PyQt4 to 5 and I'm having an issue with QtGui. I installed using the 32bit windows installer, not my own build. when I do: from PyQt5 import QtGui I get class MainWindow(QtGui.QMainWindow,…
Faller
  • 1,588
  • 3
  • 16
  • 27
39
votes
10 answers

Process finished with exit code -1073741819 (0xC0000005) Pycharm

I'm completly stuck on this. I keep getting error message Process finished with exit code -1073741819 (0xC0000005) I'm using pycharm with pyqt5.6 and qt5.6.2 and the problem started when I upgraded to these versions. I've tried searching as much…
A Rob4
  • 1,278
  • 3
  • 17
  • 35
39
votes
28 answers

DLL load failed when importing PyQt5

I have installed PyQt5 on windows platform and and getting an importError: DLL load failed. I have installed pyqt5 using the command pip3 install pyqt5 Successfully installed pyqt5-5.8.1 My Python version is as follows: Python 3.5.2 |Anaconda…
gdRow
  • 497
  • 1
  • 5
  • 10
38
votes
1 answer

How to set QComboBox to item from item's text in PyQt/PySide

Is it possible to set QComboBox to an item knowing only an item's text value? I am trying to avoid looping through for i in range(myCombobox.count()) just to find an item's index so it could be used to set the current index.
alphanumeric
  • 17,967
  • 64
  • 244
  • 392
37
votes
4 answers

This application failed to start because it could not find or load the Qt platform plugin "cocoa"

I think I did everything I could in the last 20 hours, but nothing seems to work. My app is running and working -- just as it should -- the only problem I have is that I cannot create a .app bundle from it. I tried both Py2App and cx_Freeze but non…
Peter Varo
  • 11,726
  • 7
  • 55
  • 77
36
votes
8 answers

Install PyQt5 5.14.1 on Linux

pip3 install PyQt5 Collecting PyQt5 Using cached https://files.pythonhosted.org/packages/3a/fb/eb51731f2dc7c22d8e1a63ba88fb702727b324c6352183a32f27f73b8116/PyQt5-5.14.1.tar.gz Complete output from command python setup.py egg_info: …
ooo
  • 512
  • 1
  • 7
  • 27
1
2 3
99 100