Questions tagged [pyside]

Questions about using PySide, a Python Qt bindings project.

The PySide project provides LGPL-licensed Python bindings for the Qt cross-platform application and UI framework. PySide Qt bindings allow both free open source and proprietary software development and ultimately aim to support all of the platforms as Qt itself.

3517 questions
25
votes
2 answers

Python PySide (Internal c++ Object Already Deleted)

I recently decided to write my first app with Python and PySide. But I have a problem and hope you guys can help. Python keeps raising exceptions that the "Internal C++ Object" is deleted. From my limited experience with Python I figure that my…
Johann du Toit
  • 2,609
  • 2
  • 16
  • 31
25
votes
3 answers

Prototyping Qt/C++ in Python

I want to write a C++ application with Qt, but build a prototype first using Python and then gradually replace the Python code with C++. Is this the right approach, and what tools (bindings, binding generators, IDE) should I use? Ideally, everything…
tstenner
  • 10,080
  • 10
  • 57
  • 92
24
votes
3 answers

Getting PySide to work with matplotlib

I have tried running the example code on the SciPy website, but I get this error: Traceback (most recent call last): File ".\matplotlibPySide.py", line 24, in win.setCentralWidget(canvas) TypeError:…
jonathanbsyd
  • 8,031
  • 6
  • 24
  • 26
23
votes
1 answer

Using PySide / PyQt for mobile development

I am currently looking at using PySide for mobile app development. I've done a few tutorials for creating desktop applications using Pyside and loving it. I understand PySide/PyQt is a port or mapping for Qt, and is usualy behind a little bit with…
josef.van.niekerk
  • 11,941
  • 20
  • 97
  • 157
22
votes
6 answers

Setting Mac OSX Application Menu menu bar item to other than "Python" in my python Qt application

I am writing a GUI application using python and Qt. When I launch my application on Mac, the first menu item in the Mac menu bar at the top of the screen is "Python". I would prefer the application name there to be the name of my application. How…
Christopher Bruns
  • 9,160
  • 7
  • 46
  • 61
22
votes
5 answers

How to signal slots in a GUI from a different process?

Context: In Python a main thread spawns a 2nd process (using multiprocessing module) and then launches a GUI (using PyQt4). At this point the main thread blocks until the GUI is closed. The 2nd process is always processing and ideally should emit…
NovoRei
  • 261
  • 1
  • 3
  • 7
21
votes
4 answers

Any really modern, good-looking desktop apps that are developed with PyQt/PySide?

I have started using Python for web development recently, it's kinda cool; I have seen programs that are developed in QT/C++, which is good enough in terms of esthetics; I have just noticed the new PySide project (which brings LGPL Qt license to…
Edwin Yip
  • 4,089
  • 4
  • 40
  • 86
21
votes
5 answers

PySide / Qt Import Error

I'm trying to import PySide / Qt into Python like so and get the follow error: from PySide import QtCore ImportError: dlopen(/usr/local/lib/python2.7/site-packages/PySide/QtCore.so, 2): Library not loaded: libpyside-python2.7.1.2.dylib …
elliot
  • 498
  • 1
  • 4
  • 13
20
votes
8 answers

Python code generation with pyside-uic

How can I generate python code from a QtDesigner file ? I found pyside-uic but I can't find an example for the syntax. I run win7 and pythonxy with spyder.
ArtDijk
  • 229
  • 1
  • 3
  • 5
20
votes
2 answers

Python PySide and Progress Bar Threading

I have this code: from PySide import QtCore, QtGui import time class Ui_Dialog(object): def setupUi(self, Dialog): Dialog.setObjectName("Dialog") Dialog.resize(400, 133) self.progressBar = QtGui.QProgressBar(Dialog) …
Benny
  • 695
  • 2
  • 6
  • 19
19
votes
2 answers

Why is super used so much in PySide/PyQt?

Short version (tl;dr) I am learning PySide, and most online tutorials use super to initialize UI elements. Is this important (i.e., more scalable), or is it a matter of taste? Clarification: as I make more clear in the detailed version, this is not…
eric
  • 7,142
  • 12
  • 72
  • 138
19
votes
1 answer

How do you load .ui files onto python classes with PySide?

I've used PyQt for quite a while, and the entire time I've used it, there has been a pretty consistent programming pattern. Use Qt Designer to create a .ui file. Create a python class of the same type as the widget you created in the .ui file. When…
Brendan Abel
  • 35,343
  • 14
  • 88
  • 118
18
votes
4 answers

Convert numpy array to PySide QPixmap

I want to convert an image into a NumPy array to a PySide QPixmap, so I can display it (EDIT: in my PySide UI). I already found this tool: qimage2ndarray, but it only works for PyQt4. I tried to change it to get it working with PySide, but I would…
AntonS
  • 700
  • 1
  • 6
  • 23
18
votes
6 answers

How to make a widget in the center of the screen in PySide/PyQt?

This code works, but I wonder if there is any simpler way: def center(self): qr = self.frameGeometry() cp = gui.QDesktopWidget().availableGeometry().center() qr.moveCenter(cp) self.move(qr.topLeft())
Freewind
  • 193,756
  • 157
  • 432
  • 708
18
votes
2 answers

Phonon's VideoWidget show wrong colors on a QGLWidget (Qt, Python)

I have a pet project that contains a videoplayer with a feature to display subtitles. Until now I was working on the other parts of my project, but now I have to implement the subtitle rendering part, in the best way. I didn't find anything useful…
Balazs Kanyo
  • 183
  • 7