Questions tagged [pyside2]

Questions about using PySide2, a Python Qt bindings project for Qt5.

PySide2 was released mid June 2018 as a Technical Preview (supporting Qt 5.11), and it was officially released without the Technical Preview tag, in December 2018 for Qt 5.12.

The project started in May 2015.

Wikipedia:

PySide2 is a Python binding of the cross-platform GUI toolkit Qt, currently developed by The Qt Company under the Qt for Python project. It is one of the alternatives to the standard library package Tkinter. Like Qt, PySide2 is free software. The project started out using Boost.Python from the Boost C++ Libraries for the bindings and later switched to the binding generator Shiboken to reduce the size of the binaries and the memory footprint.

PySide was released under the LGPL in August 2009 by Nokia, the former owners of the Qt toolkit, after Nokia failed to reach an agreement with PyQt developers Riverbank Computing to change its licensing terms to include LGPL as an alternative license.

Work is currently underway to officially launch PySide2 as a Qt product, after all the effort on porting PySide to work with Qt 5.

PySide2 supports Linux/X11, Mac OS X, Windows and Maemo. Support for Android is currently being added by the PySide community.

The PySide2 Homepage can be found here

1728 questions
0
votes
1 answer

How to rotate an QImage

I want to rotate my QImage by the amount of x. I don't want to use QPixMap or the PaintEvent if possible. I have already searched for possible solutions but they didn't work. Right now i am trying to solve it with the QTransform method: class…
Darjusch
  • 188
  • 13
0
votes
2 answers

Faced with the problem of updating progressbar in Qt in python

Write player, and emerged question, when I launching song, I want to progressbar was updated in the time when goes music, made cycle, threw his in thread, values on renewal are transmitted through signal in qml, but in than the problem, these values…
0
votes
1 answer

How close a window from another in pyside2?

I have 2 windows: MainWindow and a normal window, I have a button in MainWindow that open the second window and I have a button in the second window, I want when clicked the button in the second window close the MainWindow. The two windows are in…
Arthur
  • 193
  • 3
  • 10
0
votes
1 answer

Close one main window and open another one (with passing an arg)

Basically I have a launcher type deal for an application goin on with pyside2 / pyqt in the latest version of python. Upon a button press in the launcher I want it to close the current window class and open the next window(which has its own class).…
AweBob
  • 23
  • 1
  • 4
0
votes
1 answer

Make an Item in a QTableView draggable but not selectable

A bit of background (not fully necessary to understand the problem): In a PySide2 application I developed earlier this year, I have a QTableView that I'm using with a custom model. Some items in there can be selected in order to then click a button…
Erwan Leroy
  • 160
  • 10
0
votes
0 answers

How can I read a QList of QPair from a file in Python?

I'm trying to read a file written from C++ using Qt 5. The C++ code to read the file (much simplified) is: QFile file("MyFile"); file.open(QIODevice::ReadOnly); QDataStream in(&file); QList> outList; in >> outList; if…
parsley72
  • 8,449
  • 8
  • 65
  • 98
0
votes
1 answer

Absolute Position Widgets

Very confused, I've viewed multiple other stack overflow pages: class launcherWidget( QMainWindow ) : def __init__(self) : QMainWindow.__init__(self) self.setWindowTitle("Scouting Software Launcher") …
AweBob
  • 23
  • 1
  • 4
0
votes
0 answers

Constraining members of group of QGraphicsItems to share each others movements in one direction

I am trying to use the QGraphicsItemGroup class to constrain a group of objects to move by the same amount in one (e.g. the vertical) direction as shown in the diagram below, where the vertical movement of the item B (shown by a red arrow) is shared…
Olumide
  • 5,397
  • 10
  • 55
  • 104
0
votes
1 answer

Can i replace QFileSystemModel+QSortFilterProxyModel+QTreeView with QtQuick?

I haven't used QML/QtQuick, but I've heard it's simpler. I want to build a local file management system, which needs QFileSystemModel + QSortFilterProxyModel + QTreeView. My question is: can i use QML/QtQuick to do the same thing?
g2m.agent
  • 170
  • 1
  • 11
0
votes
1 answer

readjust QTableView after changes to the model

I use PySide2==5.13.0 I have a custom QTableView. A QAction invokes the remove method below. All works fine but the table view itself does not adjust its dimensions (same with the add method). def remove(self, row): print(f'remove {row}') …
moin moin
  • 2,263
  • 5
  • 32
  • 51
0
votes
1 answer

QMediaPlayer displays audio only for certain videos

I'm using QMediaPlayer according to the example in the docs. Here's my code: from PySide2 import QtWidgets from PySide2 import QtCore from PySide2.QtMultimedia import QMediaPlayer from PySide2.QtMultimediaWidgets import QVideoWidget class…
Blimmo
  • 363
  • 3
  • 11
0
votes
0 answers

How to return a value while waiting for mouse interaction in PyQtGraph in GUI Application

I'd like to use a InfiniteLine in in pyqtgraph that moves with the mouse moving. Upon left-clicking the function shall return the xposition. I am able to retrieve the x-value on left-clicking and moving the InfiniteLine with the mouse movement.…
Sebus
  • 55
  • 1
  • 7
0
votes
0 answers

How to fix 'After updating text in QLabel, text randomly changes between new and old value'

I'm using two threads Camera and NetworkProcessor in Qt application, which displayes their actual state in QLabel (there is one label for each thread: camStatusLabel, nnStatusLabel). To update text in label I am using signals and slots. There is…
sipinho
  • 1
  • 4
0
votes
0 answers

Rendering glitches occur in QGraphicsView with background when resizeEvent scales QGraphicsItem

I'm trying to scale a QGraphicsItem, (box) so that it exactly fits within a pair of lines drawn in/on the background of the QGraphicsView, as shown below import sys from PySide2.QtCore import Qt from PySide2.QtGui import QPen from PySide2.QtWidgets…
Olumide
  • 5,397
  • 10
  • 55
  • 104
0
votes
1 answer

Determining functions/methods if a specific item in the combobox is called

I'm creating a launcher, and I have a combobox that has two items with specific functions/method calls, trying to have checks if one of the items is checked and to call a method if so. I tried using the combobox currentTextChanged and…
zenith110
  • 11
  • 4
1 2 3
99
100