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
1
vote
1 answer

Custom ItemDelegate for QListView in PySide: Items invisible

Question: Why does the Python-equivalent of this answer class CustomDelegate(QtGui.QStyledItemDelegate): def paint(self, painter, option, index): opt = QtGui.QStyleOptionViewItem(option) self.initStyleOption(opt, index) …
S818
  • 391
  • 3
  • 15
1
vote
0 answers

pyside parent of multiple uis gets destroyed if one ui closes

When I use the same parent QWidget for multiple UIs all UIs close, when one UI is closed by the user. Is there a good reason for that and a solution to keep the other UIs open, when they have the same parent? Setting "setQuitOnLastWindowClosed" to…
Rico
  • 11
  • 3
1
vote
2 answers

How to set the initial width can use QListWidget and use splitter to adjust the size?

hi,I want to set the initial width can use QListWidget,and use splitter to adjust the size. I want such as this. but now,when I use the splitter, is like this.
liaokong
  • 145
  • 1
  • 9
1
vote
1 answer

How to change label by pushing a button in PySide

Can't figure out what's wrong. Just need to change label text from 'Default label' to 'New label 01'. from PySide.QtGui import * class myWidget(QWidget): def __init__(self): super(myWidget, self).__init__() layout =…
1
vote
3 answers

QGraphicsItem paint delay

What could be the possible reason for this? When i zoom in the QGraphicsView and move the QGraphicsItem, I get this weird result. It does update if I zoom or pan the View again or if I focus on other widgets. Im using PySide. And the painter…
vaishak
  • 63
  • 7
1
vote
1 answer

PySide QPushButton Right-click context menu not assigning per button

I've got a loop generating QPushButtons with context menus, and populating a sub-menu with different values based on text found in an image within a directory (That last part not important) for self.preview in previewFiles: self.image =…
Voronoi
  • 23
  • 4
1
vote
1 answer

How do I limit the mouse to a QGraphicsScene in PySide?

Or maybe QGraphicsView? I'm still not understanding mapping. See the comment # I'm not computing x and y correctly. mapTo/From/Global/Scene/??? in myview.py below. The idea is that when you single click on the ring, it toggles the mobility, tying…
1
vote
1 answer

PySide PyQt QDataWidgetMapper

I try to connect a QtGui.QPlainTextEdit to a Model with QDataWidgetMapper. I dont get any errors, just nothing in the TextEdit. I dont get it and i cant find good example Code. Here is some ExampleCode. I really hope that someone could help me. from…
1
vote
1 answer

Pyside: QLineEdit taking multiple inputs

I have developed a GUI in Qt Designer in which user can enter two values in the QLineEdit and when the user hits enter it performs some mathematical calculations. The issue is once the values are entered and enter is pressed after the output I am…
Raghavendra MG
  • 89
  • 2
  • 11
1
vote
2 answers

Where is PySide-uic.exe? (For Windows?)

I'm on the verge of giving up on trying to use PyQT4 in Maya 2016, already asked about it here. But, in a lot of places I've looked, I keep picking up the notion that I should be using PySide instead. And I would love to - but now I'm pretty much…
Gogo
  • 53
  • 1
  • 2
  • 8
1
vote
1 answer

Python hangs with Qt bindings

I have a 2.6 python installed with latest PySide Qt bindings. The following code hands if thread.start() line is uncommented. Anyone can suggest what i'm doing wrong? from PySide.QtCore import * from PySide.QtGui import * import sys app =…
grigoryvp
  • 40,413
  • 64
  • 174
  • 277
1
vote
1 answer

pytest not working with PySide

pytest seems to be ignoring tests that use PySide. For example, I have a file test_pyside.py with the contents from PySide import QtGui def test_dialog(): dialog = QtGui.QDialog() assert False The output for running python -m pytest…
elveatles
  • 2,160
  • 3
  • 18
  • 16
1
vote
1 answer

Pyside crashes when executing function twice

Why does my application crash when i run the function setup_controls() twice. Am I missing a 'parent/self' somewhere that is critical in the design? import sys from PySide import QtGui, QtCore class QCategoryButton(QtGui.QPushButton): def…
JokerMartini
  • 5,674
  • 9
  • 83
  • 193
1
vote
1 answer

Why is this PySide2 build failing to find a generated C++ wrapper?

I'm trying to build the latest release of PySide2 on MacOs Sierra 10.12.2 (16C67) with python 3.6. As of now, the build invoked with python3 setup.py build is failing with the following error: (I have substituted my name out of my home…
Louie
  • 75
  • 1
  • 6
1
vote
2 answers

Get settings from child window in Pyside

I have a few questions. How do i properly get settings from the child window when i press 'Print' button? How do i close the Settings window and save/commit changes only when user presses 'OK' vs 'Cancel' which just closes the dialog and dismisses…
JokerMartini
  • 5,674
  • 9
  • 83
  • 193