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
9
votes
2 answers

Nodal graph in Qt for Programmable Flow Charts

I was wondering if there was a nice way to allow users to create nodal graphs (with restrictions) as with LabView. Something like this: I have seen http://www.pyqtgraph.org/, which seems to have something similar, and I do intend to use PyQt as my…
Cenoc
  • 11,172
  • 21
  • 58
  • 92
9
votes
2 answers

PyQt4 code not working on PyQt5 (QHeaderView)

I was using PyQt4 and this code works great. self.table.horizontalHeader().setResizeMode(1, QHeaderView.Stretch) It's stretching a column in a table. But when I run the code with PyQt5, I'm getting this error: Attribute Error: 'QHeaderView' object…
kadir_cakir
  • 1,013
  • 1
  • 16
  • 22
9
votes
3 answers

Installing PyQt4 on Mac OSx Mavericks?

http://www.riverbankcomputing.com/software/pyqt/download I tried many solutions on internet including brew install qt brew install sip brew install pyqt to successfully install it on osx. I am using PyCharm IDE to python development and want to…
Noorsimar
  • 120
  • 1
  • 2
  • 8
9
votes
2 answers

Creating a transparent overlay with qt

I've been learning python recently and now I wanted to (try to) create my first real application, a subtitle player for Linux. So far I've been using the Greenfish subtitle player, which is aimed at Windows users and not properly working in Linux.…
troubled_sloth
  • 95
  • 1
  • 1
  • 5
9
votes
4 answers

QWidget::mouseMoveEvent not firing when cursor over child widget

I'm trying to capture the cursor coordinates as the mouse is moved within a QWidget by reimplementing QWidget::mouseMoveEvent(). With mouse tracking enabled, mouse move events are generated as I move the cursor around the main widget. However, when…
user3419537
  • 4,740
  • 2
  • 24
  • 42
9
votes
1 answer

How to display some non editable text in rich format in GUI created by PyQt4?

I have some python code that generates some information that I want to be able to print or display in a window. The whole window will be used to display the text with rich format (bold, italics, colored fonts, various font sizes, etc.). The text…
aste123
  • 1,223
  • 4
  • 20
  • 40
9
votes
3 answers

Label in PyQt4 GUI not updating with every loop of FOR loop

I'm having a problem, where I wish to run several command line functions from a python program using a GUI. I don't know if my problem is specific to PyQt4 or if it has to do with my bad use of python code. What I wish to do is have a label on my…
Ronny
  • 253
  • 1
  • 3
  • 9
9
votes
3 answers

Is it possible to have PySide's QUIloader act like PyQt's uic.loadUi?

So I have an application where I'm considering moving from PyQt4 to PySide. In this application, I use .ui files pretty frequently, with the following usage pattern: class BaseGUIWidget(QWidget): def __init__(self, parent = None, ui_file =…
aruisdante
  • 8,875
  • 2
  • 30
  • 37
9
votes
4 answers

Pros and cons of using gettext instead of QObject.tr() for localization of PyQt4 application?

I have couple of application written in PyQt4 where I've used standard Python gettext library for internationalization and localization of GUI. It works good for me. But I've selected gettext just because I've already had knowledge and experience of…
bialix
  • 20,053
  • 8
  • 46
  • 63
9
votes
3 answers

QCheckBox: how to differentiate between user-induced changes to state and those made programmatically?

Do I miss something or there is really no (ready / built-in) way to programmatically change the state of a QCheckBox without emitting the "void stateChanged ( int state )" signal? The above-mentioned signal is emitted regardless of whether "void…
mlvljr
  • 4,066
  • 8
  • 44
  • 61
9
votes
1 answer

Embedding PyQtGraph in Qt without generating new Window

I do not get how to embed PyQtGraph in my MainWindow without generating a new window like it is done by using pg.plot(...) What is the easiest way for doing that ?
dan_0
  • 599
  • 1
  • 5
  • 17
9
votes
5 answers

QComboBox inside QTreeWidgetItem

Is there something similar to the (PyQT) QTreeWidgetItem.setCheckState(0, Qt.Checked) but for the combo box? I can't see anything in the reference, so how can I insert a custom QComboBox as one of the elements within QTreeWidgetItem?
Piotr Byzia
  • 3,363
  • 7
  • 42
  • 62
9
votes
3 answers

Custom Qt Widgets with python for Qt Designer

I am trying to write a custom widget for the Qt Designer using only Python. I was following a couple of tutorials I found online but none of them were working or anything close to what I would call to be a minimum working example. So my questions…
Woltan
  • 13,723
  • 15
  • 78
  • 104
9
votes
2 answers

PyQt4 - Drag and Drop

Hey I had been going through this tutorial for understanding drag and drop methods in PyQt4. However I am not able to understand the following points . It would be nice if somepne could make it clearer to me. def mouseMoveEvent(self, e): //class…
Manoj
  • 961
  • 4
  • 11
  • 37
9
votes
2 answers

Dragging/Moving a QPushButton in PyQt

I am really struggling to figure out a way to do this. Say I implement a button very simply in a widget window: self.button = QPushButton("Drag Me", self) I can move its initialization point around the parent widget's area using…
RodericDay
  • 1,266
  • 4
  • 20
  • 35