pyside

PySide vs. PyQt ?

Has anyone tried the new Python Qt binding - PySide yet? I wonder about its matureness and compatibility with PyQt. What are your experiences on this matter? I know it has only been released this week, but it's such great news for Python development of Qt-based GUIs - there's a lot of interest in this thing. ...

Loading a simple Qt Designer form in to Pyside

I create a simple form in Qt designer and am trying to load it in to a Qt application I'm creating with PySide but without much luck. Here's the generated code from `pyside-uic': # -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'clientEditorForm.ui' # # Created: Tue Nov 3 23:46:41 2009 # by: PySide ui...

PySide Qt4 widget exchange in a hboxlayout

I'd like to exchange a widget inside a QHBoxLayout. This code seems to work, but as soon as I do the actual app._exec(), the code crashes with terminate called after throwing an instance of 'boost::python::error_already_set'. Is there any way to get the actual error message? (or to resolve this problem) gaParent = gameArea.parent().layo...

Is it possible to add PyQt4\PySide packages on a virtualenv sandbox?

Hi i'm using virtualenv with profit on my develop environment with web.py, simplejson and other web oriented packages. I'm preparing to develop a simple python client using Qt to reuse some Api developed with web.py. Does anybody here had succesfully installed PyQt4 with virtualenv? Is it possible? I've downloaded all the binaries and h...

PyQt vs PySide comparison

I currently develop many applications in a Qt heavy C++/Python environment on Linux, porting to PC/Mac as needed. I use Python embedded in C++ as well as in a stand alone GUI. Qt is used fro xml parsing/event handling/GUI/threading and much more. Right now all my Python work is in PyQt and I wanted to see how everyone views PySide. I'm i...

Installing PySide - OSX

Anyone had success installing and using PySide on OSX? I am following the install instructions on the PySide site, though I'm running into issues building the API Extractor. I run cmake on the CMakeLists.txt file inside the api extractor dir and: This error is thrown- CMake Error at /Applications/CMake 2.8-0.app/Contents/share/cmake-2...

QWebView not loading external CSS

I am using a QWebView to display some content and I want to use custom CSS to spruce up the output. I found that I can use the QWebSettings.setUserStyleSheetUrl() method to load my own CSS into the view. The .css file is in the same directory as my main program. self.webview = QWebView(MainWindow) self.webview.settings().setUserStyleS...

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 should be available in the Ubuntu repositories so I wouldn't have to worry about incompa...

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

Hi, 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 Python and it doesn't support Windows yet). In view of the above, I see the possibility...

Communication between threads in PySide

Hello, I have a thread which produces some data (a python list) and which shall be available for a widget that will read and display the data in the main thread. Actually, I'm using QMutex to provide access to the data, in this way: class Thread(QThread): def get_data(self): QMutexLock(self.mutex) return deepcopy(self.data) ...

How to install PySide v0.3.1 on Mac OS X?

I'm trying to install PySide v0.3.1 in Mac OS X, for Qt development in python. As a pre-requisite, I have installed CMake and the Qt SDK. I have gone through the documentation and come up with the following installation script: export PYSIDE_BASE_DIR="<my_dir>" export APIEXTRACTOR_DIR="$PYSIDE_BASE_DIR/apiextractor-0.5.1" export GENE...

ctypes and PySide

I'm building an app with PySide, there's some image manipulation that needs to be done and using Python code for this is way too slow. Therefore I hacked out a .dll file that will do it for me. The function definition is as follows: extern "C" { QRectF get_image_slant(QImage *img, float slantangle, float offset) { Now I can load th...

How to change text alignment in QTabWidget?

I cannot find a way to set the text alignment in a QTabWidget. After I've created an instance of this widget, I've set its tabPosition property to West, but I wish it showed text/label horizontally. I've given a look to the Qt's stylesheets, but as you can see, the text-align property can only be set on QPushButton and QProgressBar. I...

Steps for how to install QT, PyQT, and PySide on OS X Snow Leopard

I've had some problems installing QT on Snow Leopard and I'm hoping that I can benefit from someone else who's been in this position. :) I'm assuming that I'll need to use a version of python that's not included with SL... be it from homebrew, macports, python.org, etc. Can anyone give me some simple steps to follow to get QT, PyQT, an...

Steps on howto install PySide on windows

I followed what they said at pyside.org but somehow i can't get it to work. I downloaded the two files that they are linking from their site (qt libraries and pyside for python 2.6) When I try one of their examples I get the following message: Traceback (most recent call last): File "2dpainting.py", line 28, in <module> from PySi...

python qt, display text/label above another widget(phonon)

I'm making a video player using PySide which is a python bind to the Qt framework. I'm using phonon(a module) to display the video and I want to display text above the video as a subtitle. How can I put another widget above my phonon widget. Is opengl an option? ...

Setting window style in PyQT/PySide?

I've been looking for how to do this and I've found places where the subject comes up, but none of the suggestions actually work for me, even though they seem to work out okay for the questioner (they don't even list what to import). I ran across self.setWindowFlags(Qt.FramelessWindowHint) but it doesn't seem to work regardless of the im...

PySide Error - QPaintDevice: Cannot destroy paint device that is being painted

I'm baffled by this one. I tried moving the QPainter to it's own def as some have suggested, but it gives the exact same error. Here's the def I created. def PaintButtons(self): solid = QtGui.QPixmap(200, 32) paint = QtGui.QPainter() paint.begin(solid) paint.setPen(QtGui.Qcolor(255,255,255)) paint.setBrush(QtGui.QCol...

Qt: No border on buttons making them non-clickable?

I'm trying to set a style to a button so that it has no border, but it seems the lack of border then makes the button non-clickable. Is there a better way of getting no border? button = QtGui.QPushButton(todo, self) button.move(0, i * 32) button.setFixedSize(200,32) button.setCheckable(True) button.setStyleSheet("QPushButton { backgroun...

PyQt QTableWidget keyboard events while editing

I want to navigate QTableWidget in a similar way to MS Excel. e.g. When the user presses the right arrow key while editing a cell, the editing will finish and the next cell to the right will be selected. I have searched the Qt docs, but can't seem to find out how. Can anyone hep? Thanks. ...