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
8
votes
5 answers

ImportError: No module named QtWebKit

I am on centos5. I installed python26 source with a make altinstall. Then I did a: yum install qt4 yum install qt4-devel yum install qt4-doc From riverbankcomputing.co.uk I downloaded the source for sip 4.10.2, compiled and installed fine. Then…
Nathan
  • 2,941
  • 6
  • 49
  • 80
8
votes
2 answers

Get all widgets under cursor

The widgetAt function gives me the widget directly under the cursor, at the highest z-order. pos = QtGui.QCursor.pos() widget = QtGui.qApp.widgetAt(pos) But how can I get all widgets under the cursor? Including those behind the top-most one?…
Marcus Ottosson
  • 3,241
  • 4
  • 28
  • 34
8
votes
2 answers

PyQt5 and Matplotlib 1.4.2 - installing one breaks the other

I am trying to write a PyQt5 application that embeds a matplotlib plot within it. However, I am having a maddening time where if I install matplotlib PyQt5 breaks due to the interference by PyQt4. This can be seen in this error: In [2]: from PyQt5…
dan_g
  • 2,712
  • 5
  • 25
  • 44
8
votes
3 answers

pyQt4: QWidget subclass not responding to new setStyleSheet() background colour

I am having an issue with PyQt4. I want to create a new widget within a window, and I want this widget to have a custom color. When i create a subclass of the QWidget class, and instantiate it, I am not able to change its background color through…
Ronny
  • 253
  • 1
  • 3
  • 9
8
votes
3 answers

pdf viewer for pyqt4 application?

I'm writing a Python+Qt4 application that would ideally need to pop up a window every once in a while, to display pdf documents and allow very basic operations, namely scrolling through the different pages and printing the document. I've found the…
japs
  • 1,286
  • 13
  • 27
8
votes
6 answers

Python Kernel crashes after closing an PyQt4 Gui Application

Ok here is my problem: I want to create a PyQt4 Gui, which can be executed from a python console (tested with IDLE, Spyder Console and IPython Console) and then allows the user to change and view variables. After closing the app the user should be…
arthaigo
  • 423
  • 4
  • 10
8
votes
2 answers

RealTime output from a subprogram to stdout of a pyQT Widget

Hi I have seen there are already many questions on this issue however none of them seems to answer my query . As per below link i even tried winpexpect as i am using windows , however it dosent seems to e working for me . Getting realtime output…
paarth batra
  • 1,392
  • 4
  • 29
  • 53
8
votes
4 answers

Python: Embed Chaco in PyQt4 Mystery

How do i go about adding Chaco to an existing PyQt4 application? Hours of searches yielded little (search for yourself). So far i've figured i need the following lines: import os os.environ['ETS_TOOLKIT']='qt4' i could not find PyQt4-Chaco code…
random guy
  • 2,225
  • 6
  • 24
  • 24
8
votes
1 answer

Custom pyqtSignal implementation

In PyQt, you can use QtCore.pyqtSignal() to create custom signals. I tried making my own implementation of the Observer pattern in place of pyqtSignal to circumvent some of its limitations (e.g. no dynamic creation). It works for the most part,…
Marcus Ottosson
  • 3,241
  • 4
  • 28
  • 34
8
votes
1 answer

Setting the text colour of a tooltip in PyQt

I've been adding tooltips to an app that I've been writing, and had issues with the colour of the tooltip text. The app has a number of buttons, which change background and text colour depending on what the status of the button is. The text is…
Hugh
  • 726
  • 1
  • 6
  • 25
8
votes
6 answers

How to get the checked radiobutton from a groupbox in pyqt

I have a groupbox with some radiobuttons. How do I get to know which one which is checked.
user2473145
  • 109
  • 1
  • 1
  • 4
8
votes
1 answer

Dynamically add a decorator to class

I have a rather large and involved decorator to debug PyQt signals that I want to dynamically add to a class. Is there a way to add a decorator to a class dynamically? I might be approaching this problem from the wrong angle, so here is what I want…
durden2.0
  • 9,222
  • 9
  • 44
  • 57
8
votes
2 answers

grouping radio buttons in PyQt

import sys from PyQt4 import QtCore, QtGui class Class1(QtGui.QMainWindow): def __init__(self): super(Class1, self).__init__() self.func() def func(self): r0=QtGui.QRadioButton("0",self) …
sudeepdino008
  • 3,194
  • 5
  • 39
  • 73
8
votes
2 answers

Changing the Digit Color of QLCD Number

I want to change the background and digit color of QLCDNumber in Qt Designer and I am going to use that design(GUI) on my Python program. Some people said, that can get my adding style sheet in Qt-Designer. QLCDNumber{color:rgb(85, 85,…
MooreJohn90
  • 164
  • 1
  • 2
  • 11
8
votes
1 answer

Proper way to cleanup widgets in pyqt

What is the 'correct' or idiomatic way to cleanup/delete widgets when using PyQt4? Consider the following code: choices = ['a', 'b', 'c'] checkboxes = [] layout = QtGui.QVBoxLayout() dialog = MyDialog() for c in choices: …
durden2.0
  • 9,222
  • 9
  • 44
  • 57