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

PyQt/PySide - icon display

I have a PySide app which has an icon for the MainWindow (a QMainWindow instance). When I run the file normally, the icon is visible and everything is fine but when I create an exe with py2exe, the icon does not appear. This happens with cx_freeze…
user547057
  • 313
  • 3
  • 10
8
votes
3 answers

Connect double-click event of QListView with method in PyQt4

I’ve got a PyQt QListView object, and I want a method to run when it is double-clicked. This should be trivial, but it doesn't seem to work. My code is as follows: class MainWindow(QMainWindow): def __init__(self): …
Paul
  • 16,285
  • 13
  • 41
  • 52
8
votes
2 answers

PyQt4 to PyQt5 -> mainFrame() deprecated, need fix to load web pages

I'm doing Sentdex's PyQt4 YouTube tutorial right here. I'm trying to follow along but use PyQt5 instead. It's a simple web scraping app. I followed along with Sentdex's tutorial and I got here: Now I'm trying to write the same application with…
Les Paul
  • 1,260
  • 5
  • 22
  • 46
8
votes
1 answer

PyQt Event when a variable value is changed

I have a variable t t = 0 I want to start an event whenever t value is changed. How ? There's no valuechanged.connect properties or anything for variables...
Maximilien
  • 93
  • 1
  • 4
8
votes
1 answer

Run a foreign exe inside a Python GUI (PyQt)

I want to run an exe (for example calc.exe or cmd.exe) inside a python gui (python 2.7 | Windows | PyQt). Have anybody an idea how can i do this? (something like that : https://www.youtube.com/watch?v=N6GWgxEvibE) Thanks all in advance.
SDE
  • 129
  • 1
  • 7
8
votes
3 answers

Why is PyQt connect() syntax so verbose?

I'm just learning PyQt and looking at the Signals and Slots mechanism. I'm a bit baffled by the verbose syntax. Why do we have: self.connect(dial, SIGNAL("valueChanged(int)"), spinbox.setValue) I would much prefer to write the…
j b
  • 5,147
  • 5
  • 41
  • 60
8
votes
1 answer

How to set tick labels in python pyqtgraph PlotWidget

I am trying to plot a time series of a few hours per day date without blank time between each day. It works fine if I use pg.GraphicsWindow.The tick labels are 9:00 10:00 ..17:00. If I use pg.PlotWidget or pg.PlotWindow, Alt2 and Alt3 it does not…
Ulf Wållgren
  • 161
  • 2
  • 8
8
votes
1 answer

PyQt5 app exits on error where PyQt4 app would not

I have been developing a scientific application using PyQt4 for a couple of weeks, and decided to switch over to PyQt5. Aside from a few things to iron out one thing is puzzling me, and I'm not sure if its intended behavior or not. When Using…
Vince W.
  • 3,561
  • 3
  • 31
  • 59
8
votes
1 answer

Threading: PyQt crashes with "unknown request in queue while dequeuing"

One part of an application I'm developing needs to send some emails to a small group of people. Since it may take a little while to connect to the SMTP server and send the emails, I want to provide a progress bar during this operation using a…
Soren Bjornstad
  • 1,292
  • 1
  • 14
  • 25
8
votes
1 answer

Set minimum column width to header width in PyQt4 QTableWidget

I'm working with the QTableWidget component in PyQt4 and I can't seem to get columns to size correctly, according to their respective header lengths. Here's what the table layout should look like (sans pipes, obviously): Index | Long_Header |…
bedwyr
  • 5,774
  • 4
  • 31
  • 49
8
votes
3 answers

PyQt4 global shortcuts?

I have an application that opens multiple children widgets as separate windows, something like this: window1 opens window 2 which opens window 3 (simplified form). In the main window I have set CTRL+Q as the quit shortcut. Below is a stripped down…
Virgiliu
  • 3,068
  • 6
  • 32
  • 55
8
votes
1 answer

PyQt QTableView prohibitively slow when scrolling with large data sets

I have a program that loads a profile from a csv file and displays the data in a table. The loading of a pandas data frame to the table is fast because I used a custom model implementation of QAbstractTableModel, but the resizing of the QTableView…
Santi Peñate-Vera
  • 1,053
  • 4
  • 33
  • 68
8
votes
2 answers

How can I make link on web page in window using pyqt4?

I have a problem. Can I make a link on the web page in the window and when the user clicks on it, the web page will be open in the browser. For example: import sys from PyQt4 import QtGui, QtCore app = QtGui.QApplication(sys.argv) main =…
Q-bart
  • 1,503
  • 4
  • 22
  • 41
8
votes
2 answers

PyQt Enable/Disable elements in a QComboBox

I have a QComboBox that list all Windows' drive letters and let the user choose among them. During the execution, we need to enable or disable some of the letters (without removing them). Here is the basic code : all_letters = ["{}:".format(chr(i))…
samb
  • 1,713
  • 4
  • 22
  • 31
8
votes
2 answers

invoking onclick event with beautifulsoup python

I am trying to fetch the links to all accomodations in Cyprus from this website: http://www.zoover.nl/cyprus So far I can retrieve the first 15 which are already shown. So now I have to invoke the click on the "volgende"-link. However I don't know…
steph
  • 555
  • 2
  • 6
  • 21