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

Unable to redraw the matplot inside Qt application

I want to call draw() method of matplotlib, which is used to update a figure that has been altered but not atomically re-drawn. Please note that the plot has been built inside QT application. Below is the error trace: Traceback (most recent call…
ravi
  • 6,140
  • 18
  • 77
  • 154
1
vote
1 answer

Connect QMainWindow with Qdialog Widgets

first off all; thanks for answers! I created two different windows and two different Python file. i could connect them like this: When I click to "New Project" button under the QlistWidget item then it opens.This is good but i have a problem. I…
1
vote
2 answers

PySide switching widgets with events?

I can't figure it. I want to be able to swap out QWidgets according to events like button clicks but I am missing something and I haven't been able to search out any example along the lines of the code below. What I want to do is click one of the…
cvw76
  • 99
  • 1
  • 9
1
vote
1 answer

Pyside: Opening a new window with picture

I have created a UI that can be launched inside Maya. My class for this window inherits from QDialog. I want to have a button that will open a jpg into a new window, and then it closes with another button. While this other window is open I would…
ghost654
  • 161
  • 2
  • 18
1
vote
1 answer

Pyside: QScrollArea Resizing widgets

I am having an issue with the QScrollArea and it resizing my widgets. I want all of my layouts and widgets inside of my scroll area to have a fixed height. If I set scroll.setWidgetResizable(True) it will resize everything according to how many…
ghost654
  • 161
  • 2
  • 18
1
vote
1 answer

Pyside: setting the background color for QScrollArea

I am making a scroll area, but I would like to change the color of the area contained within the scroll area. I tried using a stylesheet, but that ended up changing the colors of all the widgets I added inside the scroll area. Is there any way to…
ghost654
  • 161
  • 2
  • 18
1
vote
1 answer

Getting the tops of side-by-side widgets to align using PySide

In the code below, the top of the QTextEdit and QGraphicsView widgets are not aligned when using QHBoxLayout. However, if you comment out QTextEdit and uncomment the other QGraphicsView setup, the top of the widgets align perfectly. Here are my…
Graph.One
  • 45
  • 1
  • 4
1
vote
1 answer

PyQt: How to set a mask over a QWidget to ignore mouse events but get the children events

I want to overlap widgets and make them all functional, but I can't get this done through simple layout management. I found an example applying a mask over the widget, but is in C++ and I am having a hard time trying to port it to python. The…
Nestor Colt
  • 379
  • 4
  • 18
1
vote
0 answers

PySide error (on mac, python 3.6)

I have updated qt from anaconda conda update qt and a list of new packages have been installed and several update performed: The following NEW packages will be INSTALLED: dbus: 1.10.22-h50d9ad6_0 expat: 2.2.4-h8f26bf8_1 gettext: …
1
vote
1 answer

Extending selection in either direction in a QTextEdit

Currently, QTextEdit permits selecting text and then altering that selection with shift-click-drag only on the side of the selection opposite the anchor. The anchor is placed where the selection started. If the user tries to alter the selection near…
davideps
  • 541
  • 3
  • 13
1
vote
1 answer

Add additional information to items in a QTreeView/QFileSystemModel

I would like to render each item in a QTreeView differently based on a number of attributes stored in a database and based on whether the item is a folder or a file. However, I don't understand how the QTreeView or QFileSystemModel communicate with…
davideps
  • 541
  • 3
  • 13
1
vote
0 answers

How to link PySide progress bar to a script execution

I have a script which copies files from one folder to another. During the execution, i wish to rize a progress bar window and show the percentage of execution. The progress bar window code is (UI itself made in QT Designer): class Progress(QWidget,…
kiryha
  • 183
  • 1
  • 2
  • 14
1
vote
1 answer

Semi-transparent highlights using PySide and QTextEdit (version 2)

I'm trying to make a more complete example of semi-transparent highlights using lists for: (1) aggregate R,G,B,A, and highlight counts (five lists) (2) average R,G,B,A (four lists) The values in the average list get assigned as background colors.…
davideps
  • 541
  • 3
  • 13
1
vote
1 answer

Search Filter in QTreeview Pyside

I have a working sample below that adds the search filter functionality. I feel like how I'm doing it is overkill. It was pieced together from projects I've found online. Do i really have to create this entire SearchProxyFilter to do a simple string…
JokerMartini
  • 5,674
  • 9
  • 83
  • 193
1
vote
1 answer

How to add "Select one..." to QComboBox when using QAbstractTableModel (Model/View)?

I'm using a QAbstractTableModel to populate a QComboBox. This works great, but I wish to always have the very first combobox index to contain a value of "Select one...". Is this possible, and if so - how? I have a combobox, which I set a model…
fredrik
  • 9,631
  • 16
  • 72
  • 132