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

1451 questions
17
votes
6 answers

How to build an mac os app from a python script having a PySide2 GUI?

Context: I am developping a simple Python application using a PySide2 GUI. It currently works fine in Windows, Linux and Mac. On Windows, I could use PyInstaller and InnoSetup to build a simple installer. Then I tried to do the same thing on Mac. It…
Serge Ballesta
  • 121,548
  • 10
  • 94
  • 199
13
votes
1 answer

How to connect Python and QML with PySide2?

I want to write a simple desktop application on Ubuntu and I thought that an easy way was to use Qt with QML as GUI and Python as the language for the logic, since I am somewhat familiar with Python. Now I am trying for hours to somehow connect the…
Fabian
  • 479
  • 1
  • 4
  • 15
13
votes
1 answer

Installing PySide for Python-3.6

When I try to install PySide for Python-3.6, it says it is only compatible until Python-3.4. Is there any work-around to get it installed for Python-3.6? Only these Python versions seem to be supported: [(2, 6), (2, 7), (3, 2), (3, 3), (3, 4)].
proy
  • 231
  • 1
  • 2
  • 3
11
votes
5 answers

PySide2 on windows

Does anyone know where I can find a pip-install for PySide2? It's 2017 and I can't seem to find a pip install or site-package containing the binaries for PySide2. I prefer not to deal with downloading the source code and compiling it myself, as that…
JokerMartini
  • 4,602
  • 3
  • 42
  • 128
8
votes
2 answers

Qt WebEngine seems to be initialized

When I run my Qt application I get the message Qt WebEngine seems to be initialized from a plugin. Please set Qt::AA_ShareOpenGLContexts using QCoreApplication::setAttribute before constructing QGuiApplication. The app runs fine regardless of…
Mitch
  • 2,960
  • 1
  • 13
  • 27
8
votes
1 answer

How do I use generic typing with PyQt subclass without metaclass conflicts?

I had tried the abc.ABCMeta with sip wrapper type, and it works well when subclass with abc.ABC. class QABCMeta(wrappertype, ABCMeta): pass class WidgetBase(QWidget, metaclass=QABCMeta): ... class InterfaceWidget(WidgetBase, ABC): …
user7624126
  • 163
  • 1
  • 7
8
votes
1 answer

PySide2 not closing correctly with basic example

When I run the basic script: import sys from PySide2.QtWidgets import QApplication, QLabel app = QApplication(sys.argv) label = QLabel("Hello World") label.show() app.exec_() forthe first time it all works fine. However, if I run it a second time…
mm_
  • 937
  • 2
  • 10
  • 27
7
votes
1 answer

How to convert a QByteArray to a python string in PySide2

I have a PySide2.QtCore.QByteArray object called roleName which I got encoding a python string: propName = metaProp.name() // this is call of [const char *QMetaProperty::name() ](https://doc.qt.io/qt-5/qmetaproperty.html#name) // encode the…
daljit97
  • 578
  • 10
  • 31
7
votes
1 answer

QThread in Qt on Python

I employed QThread using a worker object after reading extended discussions on how QThread should be used and overwriting its run method via subclassing it is not the proper method. However, in the method I intend to use I need to pass an additional…
Vesnog
  • 731
  • 2
  • 14
  • 30
7
votes
1 answer

Creating pyinstaller from my script, missing PySide2.QtXml in the result

What I did was call pyinstaller example.py the pyinstaller gets all the important libraries for my script. I might be worth mentioning that I am working on a Windows machine. But when i run the result it tells me: λ .\example.exe Traceback (most…
msfriese
  • 111
  • 3
  • 9
6
votes
4 answers

Python Error : No module named pkg_resources

I would like to use Python3.7 on MacOS I already Python 2.7 version. I created an alias on .bash_profile, alias python="/usr/local/bin/python3.7" then source ~/.bash_profile. So I deleted Python2.7 to /usr/local/lib/ Now, when I try to execute pip…
Solenne Daguerre
  • 109
  • 1
  • 1
  • 7
6
votes
0 answers

PySide2 cannot find a Qt dependency while building a PyInstaller

While building my PySide2 project a Qt error occurs, but I already have installed Qt in my system. I tried building the project in Windows, which occurs just fine, giving it a Dll error -- because my project use one --; but the code itself run just…
6
votes
2 answers

How to deploy pyside2 applications? - The Qt way

I need to deploy a pyside2 application based on Qt 5.12.1 for all major 3 Operative Systems (Windows, Linux and MacOS). I already checked on How to make a Python script standalone executable to run without ANY dependency? but that is not what I want…
lateo96
  • 181
  • 1
  • 13
6
votes
1 answer

PySide2 v5.12 : Creating a FileDialog on a click of a button

I designed a basic UI in the QtDesigner. Now i am trying to pop a simple file dialog on click of a button, below given is my GUI Code : from PySide2 import QtCore, QtGui, QtWidgets class Ui_MainWindow(object): def setupUi(self,…
Dravidian
  • 9,725
  • 2
  • 30
  • 67
5
votes
1 answer

Big sur QT is not showing widgets

Since today's release of Big Sur, my QT application stopped working, no any errors, project runs, just Windows are not shown. using Python with a Pyside2, writing, and launching with a Pycharms. Was fully functional yesterday - before…
Kamornik Cola
  • 504
  • 4
  • 16
1
2 3
96 97