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

Can't configure pyQt

When I compile pyQt on Windows 7 it returns an error saying: Traceback (most recent call last): File "configure.py", line 32, in import sipconfig ImportError: No module named sipconfig I have configured sip but the error still…
Python Kid
  • 313
  • 2
  • 7
  • 19
9
votes
2 answers

Edit table in pyqt using QAbstractTableModel

I'm trying to create an editable table in PyQt. Here's the code for just displaying the table: import sys from PyQt4 import QtGui, QtCore from PyQt4.QtCore import * from PyQt4.QtGui import * # données à représenter my_array = [['00','01','02'], …
nam
  • 3,542
  • 9
  • 46
  • 68
9
votes
1 answer

PyQt QComboBox setting number of visible items in dropdown

I'm working on an application in PyQt that takes an object dictionary and allows you to plot the variables streaming from a robot in real time. One of the things I'm working on to enable this is a drop down menu. Unfortunately, we have a couple…
Bradley Powers
  • 717
  • 7
  • 19
9
votes
2 answers

Make reverse diagonals white in heatmap

I'm trying to do something as seen on the image is given below, Just setting reverse diagonals white color is left. I couldn't set them as white. The chart takes integer values and I don't know what integer value is corresponding of white…
Ahmet DAL
  • 4,445
  • 9
  • 47
  • 71
9
votes
3 answers

PyQt connect SIGNAL to multiple SLOT

I am trying to learn PyQt from rapid gui programming with python and qt and currently learning Signals and Slots. Below is a short snippet of my code: self.connect(self.dial, SIGNAL("valueChanged(int)"),self.spinbox.setValue)…
RanRag
  • 48,359
  • 38
  • 114
  • 167
9
votes
1 answer

How to set QTextDocument margins and other properties (setHTML, print to pdf)?

I have the following certificate class for producing pdf document out of some images and data. After setting image sources, I call generate() function and get test.pdf output file. The document is created based on QTextDocument class using…
Ekaterina Mishina
  • 1,633
  • 5
  • 20
  • 23
8
votes
3 answers

System theme icons and PyQt4

I'm writing a basic program in python using the PyQt4 module. I'd like to be able to use my system theme's icons for things like the preference dialog's icon, but i have no idea how to do this. So my question is, how do you get the location of an…
Cdsboy
  • 740
  • 7
  • 11
8
votes
2 answers

Remove all items from a layout

I was trying to find something that would take a qt layout and delete everything from it. Just to imagine what the window looks like - I have: QVBoxLayout | ------QHboxLayout |---------QWidget | ------QHboxLayout …
kosta5
  • 1,129
  • 3
  • 14
  • 36
8
votes
1 answer

QSettings(): How to save to current working directory

For an app that can be run directly from a flash/pen/usb/jump/thumb drive, for portability in moving from one machine to another it can make sense for user settings to be stored on the memory stick in the same directory that the program is being run…
gseattle
  • 986
  • 1
  • 14
  • 23
8
votes
4 answers

PyInstaller but keeping .py files upgradeable

I've managed to package my PyQt4 app as a "standalone" application on windows, it works. However this application can upgrade itself, which is done by replacing the actual code written by me (.py files) with new versions, downloaded via the…
Flavius
  • 13,566
  • 13
  • 80
  • 126
8
votes
2 answers

How to change languages(translations) dynamically on PyQt5?

I wonder if it is possible to change the languages(translations) dynamically without using qt designer to make the UI? That means I don't want to use the function retranslateUi() to update the program interface. Here is my code, but I'm stuck on…
just_be_happy
  • 592
  • 1
  • 6
  • 19
8
votes
1 answer

How to create collapsible box in PyQt

I am using PyQt4, and I am trying to create a collapsible box where it will contains a couple of child widgets where the child widgets are already created and layout using a QVboxLayout How do I go about creating it? Currently I am unable to find…
Teh Ki
  • 455
  • 1
  • 3
  • 14
8
votes
2 answers

Pyinstaller doesn't work properly with threading

A program that runs a bat file which contains instruction for running an executable(longTask) using Qthread but it doesn't work as expected when I create an executable using Pyinstaller with the following command. I gave '--windowed' to do not…
Nagamani
  • 165
  • 1
  • 12
8
votes
1 answer

QGridLayout different column width

I am trying to create a layout looking like this: _________ | | | |1 | 2 | |__|______| | 3 | 4 | |____|____| Basically, I want cell number 1 the first row to be thinner that cell 2, but cells number 3 and 4 on the second row should have…
hoan
  • 1,277
  • 3
  • 18
  • 32
8
votes
2 answers

How to filter Multiple column in Qtableview?

I'm using QtableView to show my logs and to filter them by column, QSortFilterProxyModel is used. If i filter one column using certain value, and with the filtered data, if i try to filter second column, last filter gets reset and data are…
Anand
  • 343
  • 1
  • 5
  • 18