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
10
votes
1 answer

Why does PySide implicitely create object members from class members for Signals?

On the PySide signals and slots page it says: "Signals are runtime objects owned by instances, they are not class attributes". Apparently the QObject constructor looks in the class attributes for Signals and copies them to the object instance. This…
titusjan
  • 5,376
  • 2
  • 24
  • 43
10
votes
2 answers

How can I know if the mouse is over the widget?

I am fairly new to Qt (PyQt - PySide). I am trying to build a custom widget which is a menu. However I have hit a hard road and I can not seem to be able to sort myself out. I've read the documentation but I don't think there is a mouse state I can…
Phil
  • 13,875
  • 21
  • 81
  • 126
10
votes
2 answers

PySide Qt: Auto vertical growth for TextEdit Widget, and spacing between widgets in a vertical layout

I need to Solve two problems With my widget above. I'd like to be able to define the amount of space put between the post widgets shown in the image (they look fine as is, but I wanna know it's done). I'd like to grow the text edits vertically…
Hassan Syed
  • 20,075
  • 11
  • 87
  • 171
9
votes
1 answer

Clickable elements or child widgets inside custom-painted delegate

I have a QListView, where I display items using a custom delegate with custom painting. Within each item (i.e. each list row) I want to be able to show a couple of "hyperlinks" which the user could click on and which would then call on some…
Weetu
  • 1,761
  • 12
  • 15
9
votes
2 answers

How to implement a signal/slot defined in Qt Designer

I am trying to connect the click() signal of a button to my own function. The button is in a widget that I created with QT Designer. I load the .ui file with QUiLoader like so: class MyWidget(QtGui.QMainWindow): def __init__(self, *args): …
Sven
  • 985
  • 1
  • 11
  • 27
9
votes
3 answers

Qt Widget with Transparent Background

(I'm using PySide, but I think the answer would be the same/similar for any language bindings). I'm trying to take the shaped clock example, located here, and cause the face of the clock (circle) to be transparent so that all I see are the clock…
gdw2
  • 7,558
  • 4
  • 46
  • 49
9
votes
2 answers

How to get calling button from a clicked event

I'm trying to make an small gui to deploy .ear and .war files on my local glassfish installation. SO i have made five rows containing a file name field, a checkbox and a button to bring up a file dialogbox to locate the war/ear file. It would be…
Buzzzz
  • 887
  • 3
  • 11
  • 18
9
votes
2 answers

Matplotlib in Pyside with Qt designer (PySide)

I have been looking for a working example how to embed a matplotlib plot in pyside that is created with the QT designer while keeping the logic in a separate file. I know that there are numerous examples on the web but none of them actually uses the…
Nickpick
  • 6,163
  • 16
  • 65
  • 116
9
votes
1 answer

What are the mechanics of the default delegate for item views in Qt?

Short version What is the default delegate used by QTreeView? In particular I am trying to find its paint() method? Longer version I am a Python user (Pyside/PyQt), and am using a custom delegate to recreate some of the functionality of QTreeView.…
eric
  • 7,142
  • 12
  • 72
  • 138
9
votes
3 answers

QDialog: how to use question mark (?) button?

By default, QDialog windows have a question mark pushbutton in the upper-right corner. When I press it, the mouse cursor is changed to the 'Forbidden' cursor, and nothing else seems to happen. While there is lots of information generated from those…
eric
  • 7,142
  • 12
  • 72
  • 138
9
votes
3 answers

python child process crashes on numpy dot if PySide is imported

I've got this very peculiar hanging happening on my machine when using pytnon multiprocessing Pool with numpy and PySide imported. This is the most entangled bug I have seen in my life so far:) The following code: import numpy as np import…
otognan
  • 1,736
  • 3
  • 16
  • 20
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
1 answer

QWidget does not draw background color

I am using PySide 1.2.1 with Python 2.7 and I need a widget to draw a colored background. In Qt Designer I created a simple window consisting of a label, a widget containing three other items and another label. For the widget containing the button,…
Robert
  • 227
  • 1
  • 3
  • 9
9
votes
2 answers

Embeding PySide/PyQt widget into Qt/C++ application

I have a C++/Qt application which should have its GUI extensible with modules. Extending should be simple and versatile. I am just checking a concept - is it possible to have this main C++/Qt application that would execute a Python/PySide/PyQt…
9
votes
2 answers

PySide: Segfault(?) when using QItemSelectionModel with QListView

Same exact problem as this: Connecting QTableView selectionChanged signal produces segfault with PyQt I have a QListView, and I want to call a function when an item is selected: self.server_list =…
user1438098
  • 2,239
  • 3
  • 18
  • 14