Questions tagged [pyqt4]

PyQt is a set of Python bindings for Qt application framework and runs on all platforms supported by Qt including Windows, MacOS/X and Linux.

PyQt is developed by Riverbank Computing.

It is available on all platforms under a variety of licenses including the GNU GPL (v2 and v3) and a commercial license.

Unlike Qt, PyQt v4 is not available under the LGPL.

5631 questions
2
votes
1 answer

PyQt widget alignment with other elements

Consider this small GUI example that is supposed to display two GroupBoxes. The first one is placed in a custom QWidget: import sys from PyQt4 import QtGui class SomeBoxWidget(QtGui.QWidget): def __init__(self): super(SomeBoxWidget,…
a.smiet
  • 1,727
  • 3
  • 21
  • 36
2
votes
3 answers

QRegEx to highlight everything between braces

I'm trying to get a regular expression to match the text between curly braces The following SO question. Gave me a start but it's not working for me. And I'm not sure what I'm doing wrong. Consider the following: The {quick} brown fox {jumped over…
user595985
  • 1,543
  • 4
  • 29
  • 55
2
votes
1 answer

Inserting hidden data into a combobox pyqt

I'm not sure if this can be done or if there is a better way to do it. Nonetheless, I've got a database from which I can insert a lot of items into a combobox, however to search and delete for that specific data I need to be able to place each row's…
Argus
  • 911
  • 3
  • 9
  • 20
2
votes
1 answer

Python: cannot import from PyQt5.QtCore (attempting example script)

I'm introducing myself to PyQt5 through one of its included examples. On this windows 7 machine, I have installed Python 3.4 x64, and PyQt5 using its binary provided on riverbankcomputiong.com. The documentation says that the binary already includes…
Jpsousa4
  • 21
  • 1
  • 3
2
votes
2 answers

Make QSpinBox.valueChanged() only respond to Mouse Wheel

I have QSpinBox's Signal valueChanged connected to a QWidget's function like: class MyWidget(QtGui.QWidget): def __init__(self, *args): QtGui.QWidget.__init__(self, *args) #just an example mySpinBox = QtGui.QSpinBox() …
tobilocker
  • 891
  • 8
  • 27
2
votes
2 answers

PyQt Windows installer with Anaconda Python--PyQt4 not found; how do I troubleshoot?

Note: My first attempt at asking a question was confusing PyQt and pyqt_fit. I've preserved my first attempt below for archival purposes. It seems clear that PyQt should be a prerequisite to getting pyqt_fit working. I installed…
Philip
  • 323
  • 3
  • 13
2
votes
1 answer

Cannot delete matplotlib.animation.FuncAnimation objects

EDIT/TL;DR: It looks like there is a matplotlib.backends.backend_qt4.TimerQT object that hold a reference to my FuncAnimation object. How can I remove it to free the FuncAnimation object? 1 - A little context I'm trying to animate a plot generated…
Cyrille
  • 13,905
  • 2
  • 22
  • 41
2
votes
2 answers

Create a QMenubar under QTabWidget tabs

I'm trying to find a way to insert QMenuBar under QTabWidget. Could not find any solution, tried to get QMenuBar intilization from generated .ui file of QMainWindow but no luck self.menubar = QtGui.QMenuBar(self.myTab) …
PYPL
  • 1,819
  • 1
  • 22
  • 45
2
votes
0 answers

Cropping image with PyQt and matplotlib RectangleSelector

I am currently designing an application with matplotlib and PyQT. The UI contains several buttons and matplotlib widgets. UI design is dynamic linked by using uic function as this link. One button function is to interactively crop the image. I have…
Jacky Ko
  • 66
  • 3
2
votes
2 answers

In PyQt, how do I convert QImage to a list of pixels?

I see the QImage.bits() function, and the QImage.constBits(), but both return a voidptr and I'm not sure in python what you can do with that. I am familiar with the C++ syntax, but not for python. As for data type, i mean this: A black and white…
Jonathan
  • 6,741
  • 7
  • 52
  • 69
2
votes
1 answer

Convert UI file to Python Using pyuic4 Issue

I'm trying to convert a ui file to python using pyuic4 but I get "The system cannot find the path specified". (pyuic4 Mainwindow.ui > MainWindow.py) I'm not sure why since I've given the command line the exact location of the file (pyuic4) in…
user3723727
  • 142
  • 1
  • 4
  • 15
2
votes
1 answer

Why does a pyplot window behave differently when it is generated from a stand-alone function vs. a function called from an event handler?

When I run my setup_plot and dataq functions on their own the pyplot window behaves as expected, i.e. after the run finishes the buttons (pan/zoom etc) in the navigation toolbar are active. However, when I import the functions and call them from a…
Drew
  • 29
  • 7
2
votes
1 answer

threading for tray icon application

I want to have a tray icon to inform me whether or not my COM port is plugged-in. It should change every 5 seconds according to the state of the COM port. I also want the ability to kill the program using the contextual menu of the tray icon. I…
2
votes
1 answer

PySide Qt4 - Qtabwidget - Disable drag and drop of a single q tab widget

I have a qtabwidget with one or more tabs in it at any given time. I would like the user to be able to rearrange the second through last tab in any order, but the first tab to remain at index 0. From everything I've found, there is no way to enable…
2
votes
1 answer

Pass a variable from one Class to another in PyQt

I want to pass a string variable from Main_Window class to another QDialog class in PyQt. I can't understand what I do wrong. I want to pass host_mac variable from Main Class to QDialog Class. Here the main part of my code. Here is the QDialog…
Bill
  • 35
  • 1
  • 10
1 2 3
99
100