pyqt

Can I use setup.py to pack an app that requires PyQt5? 19.05.2016

Can I require PyQt5 via setup.py? In a word yes, as long as you restrict your support to PyQt5 and Python3. The requirements specified in setup.py are typically provided by requesting packages from the Python Package Index (PyPi). Until recently these packages were source only, meaning that an ...




PyQtConfig

PyQtConfig


QColorButton: A color-selector tool for PyQt25.04.2014

Below is a short snippet to implement a color-picker attached to a button in Qt. Clicking on the button pops up a dialog (native) to select a color. The color is shown by the color of the button face. A right-click option is included to allow clearing of the color ...


Transmit extra data with signals in PyQt13.01.2014

Signals are a neat feature of Qt that allow message-passing between different areas of your program. To use a signal you attach a function to be called in the event of the signal firing, usually accepting a small item of data about the signal state. However, there is a limitation: the signal can only emit the data it was designed to do. So for example, a QAction has a .triggered that fires when that particular action has been activated. Unfortunately the receiving connected function only receives one thing: checked=True or False. In other words, the receiving function has no way of knowing which action triggered it. This is usually fine. You can tie a particular action to a particular function. However, sometimes you want to trigger multiple actions off the same type of action, and treat them differently. Here’s a neat trick to do just that.


cx_Freeze and PySide on Mac18.04.2013

I’d had success using py2app for building Mac binaries for distribution but wanted to give cx_Freeze a go since it’s cross platform - allowing builds for Windows, Linux, and more. Unfortunately, attempting to build using cx_Freeze was resulting in errors: libpyside-python2.7.1.1.dylib: No such file or ...