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

How to get mouse release coordinates in QGraphicsView

Hi I'm new to Qt and pyside. I'm trying to get the coordinates of mouse in a QGraphicsView instance. I tried to reimplement my mouseReleaseEvent but wondering how would I actually use this reimplemented function. In MainWindow class: self.tScn =…
Q_Chang
  • 389
  • 3
  • 6
1
vote
1 answer

how to set font for QPlainTextEdit application-wide

In my application I may have multiple QPlainTextEdit widgets. I also have a global settings of font for this widget and when I change this font in the global setting, I want the new font to be automatically propagated to all existing QPlainTextEdit…
1
vote
1 answer

Is there a cross-platform way to do PySide spontaneous resize event checking?

My latest attempt to use the full screen results in different behaviors under Mac OS X and Linux. I have my code query the screen size and then maximize. That's the only time I want to resize. Once everything is maximized, I draw and reposition…
Ubuntourist
  • 775
  • 11
  • 26
1
vote
2 answers

How to hide an item from QFileSystemModel in QTreeView in PySide?

I cannot figure out how to hide an item or a row from QFileSystemModel? After using removeRows nothing happens. I've also tried self.model.beginRemoveRows(QtCore.QAbstractItemModel.index(), 0, 10) self.model.endRemoveRows() With no result.…
Kowalski Paweł
  • 594
  • 1
  • 6
  • 27
1
vote
1 answer

Waiting in for loop until QRadioButton get checked everytime?

I have a situation where i need to get Pass/Fail from tester for every test step in PySide GUI. Now the data of testsuite i am running in for loop and trying to get current checked/unchecked state of QRadioButton in for loop based on which i will do…
Pawankumar Dubey
  • 387
  • 1
  • 6
  • 21
1
vote
1 answer

PyQt Get specific value in ListWidget

I am new to python and pyqt/pyside ... i make customwidget class consist of 2 label (title & desc) which is example instance to add to Listwidget later ... here is the complete clean code (pyside maya) import PySide.QtCore as qc import PySide.QtGui…
1
vote
3 answers

How to set stylesheet on QFileDialog?

I'm trying to set my QFileDialog style sheet but is has not effect. Here is the code: dial = QFileDialog() dial.setStyleSheet(self.styleSheet()) path = dial.getOpenFileName(self, "Specify File") Any ideas why this don't work?
Dariusz
  • 960
  • 13
  • 36
1
vote
1 answer

Objects seems to be deleted if not assigned to object variable in PySide

I'm trying to use QStandardItemModel to represent a hierarchy of data, but when I'm adding QStandardItems to the model, I have to assign them in object member variables, or the objects seems to be deleted. For example self.tree_model =…
AkiRoss
  • 11,745
  • 6
  • 59
  • 86
1
vote
1 answer

PySide Qt: Drag and drop of an image

The title basically says it all. I want to create an image that I can drag around inside a window. My code so far does all that but for some reason, the image appears really small even though, I used the scaled() function to resize it. Also, if I…
Lucas W
  • 43
  • 6
1
vote
1 answer

Broken MySql driver for PySide2 on Windows?

I've been forced to try to port to PySide2 from PySide because I'm developing code (on Windows 7) used inside Maya and Maya 2017 has moved to PySide2. PySide2 ships with Maya but only comes with the driver to talk to sqlite DBs. So I need to tell Qt…
T Melson
  • 11
  • 2
1
vote
1 answer

Recursively collect all checked QTreeview items in python

Could someone help me create a recursive function which loops through the treeview QStandardItemModel and collects all items which are 'checked true' I'm not entirely clear on how to go about doing this myself. from PySide import QtGui, QtCore from…
JokerMartini
  • 5,674
  • 9
  • 83
  • 193
1
vote
1 answer

How to achieve transition in QProgressBar from "busy" like mode into standard progress mode?

Let's say I have task of collecting files and later on copying. While collecting the QProgressBar is showing some indefinite, "busy" status. After that process is moving on to copy collected files and show progress. The problem is that I can do any…
Alex
  • 3,167
  • 6
  • 35
  • 50
1
vote
0 answers

PySide QApplication([]) segfaults, but only in non-interactive ipython session

I read that an empty list as an argument for the QApplication should work (instead of sys.argv). However in my case it does work when running it in an interactive ipython shell, but executing it with ipython results in a segmentation fault. Any idea…
Johannes
  • 3,300
  • 2
  • 20
  • 35
1
vote
1 answer

Custom QTreeview expanded event method

When I create my own custom QTreeView with a defined 'expanded' method, do I need to do anything special to emit the default signal? I've commented out pseudo code representing what i'm asking about. Or am I safe to do what I'm currently…
JokerMartini
  • 5,674
  • 9
  • 83
  • 193
1
vote
1 answer

QLineEdit color change for a flash when return pressed in PySide

I am having a QLineEdit object and the inbuilt signal 'returnPressed' is connected to perform some task. But when I click return, I want to notify the user about the key press by flashing a different color for a small duration and reverse back to…