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
8
votes
2 answers

Get all widgets under cursor

The widgetAt function gives me the widget directly under the cursor, at the highest z-order. pos = QtGui.QCursor.pos() widget = QtGui.qApp.widgetAt(pos) But how can I get all widgets under the cursor? Including those behind the top-most one?…
Marcus Ottosson
  • 3,241
  • 4
  • 28
  • 34
8
votes
2 answers

calling a parent method from a child widget in pyside/pyqt

I'm trying to call a method of a parent class from within a child class. Specifically, my parent class is a PySide.QtGui.QMainWindow object, and my child class is a PySide.QtGui.QWidget object; the latter is set to be the central widget of the…
sammosummo
  • 495
  • 1
  • 7
  • 17
8
votes
2 answers

pyside qtreewidget constrain drag and drop

I'm trying to add a constraint to the QTreeWidget drag and drop function to prevent the branches from entering another branch in another root. Here's an example to make things more clear: I have 4 objects. Lets call them apple, banana, carrot,…
ScottWilson
  • 360
  • 3
  • 15
8
votes
1 answer

how to debug a pyside segmentation fault in a virtualenv?

I am building a Qt app with pyside and I have random segmentation faults. I installed faulthandler and the callstack is clear if uncomplete : File "/home/lionel/Libs/python/ProcessGraph/process_graph/qtgraph.py", line 247 in itemChange File…
LBarret
  • 1,113
  • 10
  • 23
8
votes
3 answers

How do I achieve consistent highlighting of QListWidget items across widget states?

I am using PyQT 4.8.3 to create a dialog with two QListWidgets both allowing multiple selection. I find that if these QListWidgets are enabled, the selected items are highlighted in blue only when the QListWidget has focus, without focus the…
Kelly Thomas
  • 440
  • 7
  • 17
7
votes
1 answer

PySide SVG image formats not found?

I am using PyDev plugin for Eclipse with Qt integration. I have PySide installed and I am having trouble with SVG image formats. I know when I run my application the formats located in C:\Python27\Lib\site-packages\PySide\plugins\imageformats are…
7
votes
2 answers

PySide wait for signal from main thread in a worker thread

I decided to add a GUI to one of my scripts. The script is a simple web scraper. I decided to use a worker thread as downloading and parsing the data can take a while. I decided to use PySide, but my knowledge of Qt in general is quite limited. As…
Peter Throwson
  • 405
  • 2
  • 5
  • 7
7
votes
2 answers

PySide6: Signals not included in typing files? (QtCore.pyi etc.)

Consider the following minimal working example: #!/usr/bin/env python3 from PySide6.QtCore import QTimer from PySide6.QtWidgets import QLabel, QApplication app = QApplication() label = QLabel('Label') x = 0 def timeout(): global x x += 1 …
Philipp Burch
  • 869
  • 1
  • 7
  • 16
7
votes
2 answers

DeprecationWarning: Function when moving app (removed titlebar) - PySide6

I get when I move the App this Warning: C:\Qt\Login_Test\main.py:48: DeprecationWarning: Function: 'globalPos() const' is marked as deprecated, please check the documentation for more information. self.dragPos =…
bangKok
  • 332
  • 2
  • 13
7
votes
1 answer

Single column QTreeview search filter

I have two questions: I was wondering if this is the proper way to do a search/filter on a single column treeview. I feel like a lot of my copying/pasting could contain unnecessary stuff. Is all the code in the subclass of QSortFilterProxyModel and…
JokerMartini
  • 5,674
  • 9
  • 83
  • 193
7
votes
2 answers

Pyinstaller missing SqlAlchemy dlls

I am using Pyinstaller to compile Python to a standalone executable. The sourcecode includes modules PySide and SqlAlchemy. The dist .exe that PyInstaller creates runs OK, but when I run commands that access the database I get this error code in the…
7
votes
1 answer

collect all items in QTreeview recursively

How can I collect all Qtreeview items so i can then iterate over them and apply necessary changes like display text updates, or color changes? Is there an easy way to collect all of them using the 'match' method? def get_checked(self): model =…
JokerMartini
  • 5,674
  • 9
  • 83
  • 193
7
votes
1 answer

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…
Tryst
  • 313
  • 1
  • 6
  • 12
7
votes
2 answers

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…
Markon
  • 4,480
  • 1
  • 27
  • 39
7
votes
2 answers

How to detect dialog's close event?

Hi everyone. I am making a GUI application using python3.4, PyQt5 in windows 7. Application is very sample. User clicks a main window's button, information dialog pops up. And when a user clicks information dialog's close button (window's X…
passion053
  • 473
  • 3
  • 8
  • 21