[PySide] PySide6 true_property
paolo at paolodestefani.it
paolo at paolodestefani.it
Mon Aug 9 17:07:26 CEST 2021
Hello list
I'm new to pyside but i played a lot with pyqt5 in the last few years.
I'm trying to port to pyside6 a simple application using snake_case and
true_property new options
But I immediately got stuck in this simple problem: how to set the
geometry of a widget ?
Before i used widget.setGeometry(10, 10, 50, 50) but how to do this with
true_property ?
from PySide6.QtWidgets import QApplication, QWidget
from PySide6 import QtCore
from __feature__ import true_property
app = QApplication([])
w = QWidget()
w.geometry = 10, 10, 50, 50
Traceback (most recent call last):
Python Shell, prompt 6, line 1
builtins.TypeError: 'PySide6.QtWidgets.QWidget.geometry.fset' called
with wrong argument types:
PySide6.QtWidgets.QWidget.geometry.fset(tuple)
Supported signatures:
PySide6.QtWidgets.QWidget.geometry.fset(PySide6.QtCore.QRect)
PySide6.QtWidgets.QWidget.geometry.fset(int, int, int, int)
How can i use the second sopported signature if not passing a tuple ?
--
Paolo De Stefani
More information about the PySide
mailing list