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

OpenALPR not work with PyQt

I tried to build a GUI app with PyQt and openalpr, but there are an issue with my code. A simple example: from openalpr import Alpr from PyQt4 import QtCore, QtGui class AnalizePlate(object): def __init__(self): self.alpr = None …
Aleksandar
  • 644
  • 1
  • 11
  • 29
13
votes
1 answer

qt gridlayout spanning multiple columns

I am trying to create this geometery: _ ___ | | | |1| 3 | |_|___| |_2_| Where the 1 box is tall and skinny, the 2 box is short and wide. I can't quite get the layout correct. When I cange the rowSpan and columnSpan for 1 and 2 from 0 to 1 I…
Don Smythe
  • 9,234
  • 14
  • 62
  • 105
13
votes
1 answer

PyQt4 setParent vs deleteLater

I have a layout that I add a lot of custom widgets to with something like layout.addWidget(widget). Later I want to remove all those custom widgets and add new ones. I'm confused on the best way to do this when it comes to deleteLater and…
durden2.0
  • 9,222
  • 9
  • 44
  • 57
13
votes
4 answers

Can I embed plotly graphs (offline) in my PyQt4 application?

I know that plotly renders into HTML and can be embedded in web-like environments. I wonder if one can do that inside an HTML window in a PyQt application? Specifically I'd like to know if that works offline, having no internet…
chiefenne
  • 565
  • 2
  • 15
  • 30
13
votes
2 answers

PyQt Connect to KeyPressEvent

Certain widgets will allow me to do: self.widget.clicked.connect(on_click) but doing: self.widget.keyPressEvent.connect(on_key) will fail saying that the object has no attribute 'connect'. I know that sub-classing the widget and re-implementing…
jpcgt
  • 2,138
  • 2
  • 19
  • 34
13
votes
10 answers

Cannot import PyQt4.QtGui

I have a working Python 2.6 install and just installed the PyQt4 built for Python 2.6 (available at http://www.riverbankcomputing.co.uk/software/pyqt/download). When I try to import PyQt4.QtGui I get the following error: ImportError: DLL load…
Rock Hymas
  • 395
  • 1
  • 3
  • 8
13
votes
1 answer

QObject (QPlainTextEdit) & Multithreading issues

Im currently trying to learn Networking with Python asyncore and pyqt4. I coded a small server, which basically listens on some port, and resends all messages it recieves to the sender. Since both qts QApplication.exec_() and asyncore.loop() are…
smerlin
  • 6,446
  • 3
  • 35
  • 58
13
votes
5 answers

how to disable the window maximize icon using PyQt4?

I would like to know how to disable the window Maximise button in pyqt4. I am at present using QWidget.setFixedSize (self, QSize) to prevent user window resizing, however the maximise button is still enabled and when pressed causes the application…
jim
  • 331
  • 1
  • 3
  • 7
13
votes
1 answer

How to find specific Qt.ItemFlag occurrence into custom Qt.ItemFlags instance in PyQt?

I have a QTreeWidget with QTreeWidgetItems. Method QTreeWidgetItem.flags() returns me Qt.ItemFlags instance. The Qt.ItemFlags type is a typedef for QFlags. It stores an OR combination of ItemFlag values. Well, assume now that I have one of my…
Bruno Gelb
  • 5,322
  • 8
  • 35
  • 50
13
votes
2 answers

Events and signals in Qt's QGraphicsItem: How is this *supposed* to work?

Like other primitives in Qt, QGraphicsItems can handle mouse events and the like. Sweet! Now say I need for an event on one QGraphicsItem to be propagated to some other QGraphicsItems in the same scene. I can think of two ways that one might…
BrianTheLion
  • 2,618
  • 2
  • 29
  • 46
12
votes
4 answers

WYSIWYG tool for programming GUI in Python?

I was hoping to find a tool similar to Borland Delphi or VisualBasic for Python. Basically, I want to be able to program Windows apps with ease, without actually having to code every single widget. Does such a software exist? Thanks!
Bo Milanovich
  • 7,995
  • 9
  • 44
  • 61
12
votes
1 answer

How to dynamically change child widgets with Python and Qt?

I would like to create a widget that has a child widget that I can dynamically change. Here is what I tried: import sys from PySide.QtCore import * from PySide.QtGui import * class Widget(QWidget): def __init__(self, parent=None): …
Jules
  • 6,318
  • 2
  • 29
  • 40
12
votes
2 answers

PyQt4: Create a custom dialog that returns parameters

I'm attempting to add a custom dialog box to my current GUI that can be launched for the user to set some parameters. Ideally, I would like to create the custom dialog using QtDesigner. Below is the code generated by pyuic4 from the QtDesigner ui…
Thomas
  • 123
  • 1
  • 1
  • 4
12
votes
1 answer

QTableWidget - Change the row color

I'm trying to change the background color of a QTableWidget row. There are some others posts about the same thing but none of the given solutions worked for me. With that solution, we are setting the background on an already existing item in the…
stepBystep
  • 187
  • 1
  • 1
  • 8
12
votes
3 answers

How to interchange data between two python applications?

I have two python applications. I need to send commands and data between them (between two processes). What is the best way to do that? One program is a daemon who should accept commands and parameters from another GUI application. How can I make…
PocketSam
  • 368
  • 4
  • 14