diff options
author | Adrian Herrmann <adrian.herrmann@qt.io> | 2022-07-11 11:29:35 +0200 |
---|---|---|
committer | Adrian Herrmann <adrian.herrmann@qt.io> | 2022-07-20 15:21:02 +0200 |
commit | eae788072fff001028e0c8f04babd61325125281 (patch) | |
tree | 76336aa495ebdb4f58a68056cfe8c2633306513f /examples/widgets/itemviews/spreadsheet/main.py | |
parent | a3c1a50eb1577caf3715c47b00ca26312d235a80 (diff) |
PySide6-examples: SpreadSheet example
Port pre-existing SpreadSheet example to PySide.
Pick-to: 6.2 6.3
Change-Id: I32d014fbd5e3e406672b6bec2465c6e41c3a6580
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Diffstat (limited to 'examples/widgets/itemviews/spreadsheet/main.py')
-rw-r--r-- | examples/widgets/itemviews/spreadsheet/main.py | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/examples/widgets/itemviews/spreadsheet/main.py b/examples/widgets/itemviews/spreadsheet/main.py new file mode 100644 index 000000000..0ecc5ec23 --- /dev/null +++ b/examples/widgets/itemviews/spreadsheet/main.py @@ -0,0 +1,19 @@ +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause + +import sys + +from PySide6.QtGui import QPixmap +from PySide6.QtWidgets import QApplication, QLayout + +from spreadsheet import SpreadSheet + +if __name__ == "__main__": + app = QApplication() + + sheet = SpreadSheet(10, 6) + sheet.setWindowIcon(QPixmap(":/images/interview.png")) + sheet.show() + sheet.layout().setSizeConstraint(QLayout.SetFixedSize) + + sys.exit(app.exec()) |