Pseudo transparency with PyQT

I want to create a pseudo-transparent window by taking a screenshot of what would be behind the window if it wasn't there using PyQt. The following code takes a...

PyQt: RuntimeError: wrapped C/C++ object has been deleted

If I run this code: #!/usr/local/bin/ python3 import sys from PyQt4.QtCore import * from PyQt4.QtGui import * class Window(QMainWindow): def __init__(self): ...

PyQt4: How to pause a Thread until a signal is emitted?

I have the following pyqtmain.py: #!/usr/bin/python3 import sys from PyQt4.QtCore import * from PyQt4.QtGui import * from pyqtMeasThread import * class MainWindow(QMainWindow): def...

How to install PyQt5 in Python 3 (Ubuntu 14.04)

I need to port some code that's Python2+PyQt4 to Python3+PyQt5. I started installing pip3 sudo apt-get install python3-pip Works great. Tried sudo pip3 install PyQt5 Downloading/unpacking PyQt5 ...

Create a pyqt build in GitLab

I'm making a program in pyqt4, using python3.4 and host on Gitlab. When I'm trying to make a build this fails. This is the .gitlab-ci.yml file form my project: before_script: - apt-get...

How to install PyQt4-phonon (python3 version) on Ubuntu

I have installed pyqt4 on ubuntu. Now my project requires pyqt4-phonon module. I have tried this way below which I got from the Internet: sudo apt-get install Python-qt4-phonon but I still...

PyInstaller makes my 4kb python program 163MB. Is this normal?

There are dozens of questions on here asking how to decrease the size of Py2EXE and PyInstaller windows binaries (complaining about executables 10MB in size), but my issue is two orders of...

PyQt4 installed but "ImportError: No module named 'PyQt4"' in ubuntu 16.04

I have installed PyQt4 using apt as follows: sudo apt install python3-pyqt4 But I still get an error as: ImportError: No module named 'PyQt4' when I do import PyQt4 System specs: Python...

pyqt4 window resize event

I'm using python3 and pyqt4 and I want some code to run every time my QMainWindow is resized.I would like something like this self.window.resized.connect(self.resize) but resized is not a...

Can PySide be used with Anaconda Python 3.5?

There seems to be very little information out there about PySide/PySide2 support under Anaconda 4.2 Python 3.5. While Anaconda 4.2 officially supports PyQt5 for both Python2.7 and Python3.5,...

Move QPushButton inside a QGridLayout

I use the latest version of PyQt4, and python3. The game I want to make its most common name is "sliding puzzle". I know the easy part (start, reset, close, and the stopwatch time), but I have...

pyinstaller error: OSError: Python library not found: libpython3.4mu.so.1.0, libpython3.4m.so.1.0, libpython3.4.so.1.0

I'm using Python 3.4.4 on Centos7. I've created a python program on my local machine that makes use of qt modules. The program is running fine on my local machine. I'm now trying to create an...

PyQt4.QtGui import error

I have installed PyQt4 package for python3 and the PyQt4 library files are available at /usr/lib/python3/dist-packages/PyQt4. When I import PyQt4 there is no problem but when I try to import QtGui...

Is there a difference between QFileDialog strings in PyQt4 and PyQt5?

I have a block of code that opens a QFileDialog using Python3 and PyQt5: from PyQt5.QtWidgets import QApplication, QWidget, QPushButton, QFileDialog import sys class MCVE(QWidget): def...

Porting range-slider widget to PyQt5

I am currently in need for a range slider (a slider where I can set up a min and a max value). I found two related questions...

Cant get pyperclip to use copy and paste modules on python3

Specs: Python3.5 Latest Pyperclip Both xclip and python3-pyqt4 installed using ssh(Putty) to connect to headleass raspberry pi 2 model B using Latest Raspian Stretch Light Error:...

PyQt5 error "PyCapsule_GetPointer called with incorrect name"

I've just built PyQt5 in a pyenv virtualenv with python 3.6.3 on OpenSUSE leap, the build went fine, but when I import >>> from PyQt5 import QtCore Traceback (most recent call last): File...

pyperclip module raising an error message

I'm using Python 3.4.0 on ArchLinux (without X11) as guest in a Vagrant box. When running my script I get this error message: Pyperclip could not find a copy/paste mechanism for your...

Pickle a QPolygon in python 3.6+ and PyQt5

I try to pickle a QPolygon and load it afterwards, but I get an error. I have done this on Python2 with PyQt4 but want to use it now on Python3 with PyQt5. I do not want to read/load data...

How to avoid Segmentation fault when calling Python scripts in Qt project

I'm trying to call a function in Python under C++. This is my attempt: void myFuncion() { PyObject* fExportar = nullptr; PyObject* modulo = nullptr; PyObject* pName = nullptr; ...

pyuic4 ImportError: No module named port_v2.ascii_upper

I'm trying to convert a Qt widget created with Qt Designer in a py file using ' pyuic4 I just do pyuic4 widget.ui -o ui_widget.py But I get this error: Traceback (most recent call last): File...

Installing local packages with Python virtualenv --system-site-packages

I know this topic has been beat to death but I have not been able to find a solution to the problem I'm having on SO or elsewhere, so I suspect that there may be a bug somewhere in my system. I am...

pip install cx_Freeze command not working

pip install cx_Freeze Gives this error:- Collecting cx_Freeze Using cached...

pyqt5: qt.qpa.xcb errors when launching app

I'm migrating my application from pyqt4 to pyqt5. Most of it works fine except for this issue I keep having on app launch: $ python3 /tmp/loading.py qt.qpa.xcb: failed to initialize...

PyQt5 error: This application failed to start because it could not find or load the Qt platform plugin "xcb"

I upgraded PyQt4 to PyQt5 and I use python3. I have the following imports: from PyQt5.QtCore import * from PyQt5.QtGui import * from PyQt5.QtWidgets import * And I have the following main: if...

PyQt5: version LIBDBUS_1_3 not defined in file libdbus-1.so.3 with link time reference

I use python3 and I'm trying to migrate from PyQt4 to PyQt5. I have the following code: from PyQt5.QtCore import * from PyQt5.QtGui import * from PyQt5.QtWidgets import * class MyMonitor(QWidget,...

Accessing clipboard on Travis-CI

I am trying to run an (integration?) test on my application, to verify that it actually copies the expected string to the clipboard with pyperclip. This part is working on my development machine...

PyQt5 QListWidget custom items

I am very new to PyQt5 and I'm trying to make a custom qlistwidgetitem for a qlistwidget in python3+ but so far with no success. The original code which I like and tried to port is from this link....

Pyqt4 in Ubuntu 20.04

How to install Pyqt4 in ubuntu 20.04 I have already tried all the commands: sudo apt-get install python-qt4 sudo apt-get install libqt4-dev sudo apt-get install pyqt4-dev-tools sudo apt-get...

can not connect to Xserver while running python file using pyQT4 via ubuntu service

I am trying to execute python file which uses PyQT4 I am running below service file [Unit] Description = Test After=multi-user.target [Service] Type=simple ExecStart = /usr/bin/python3...

Relevant tags