diff options
Diffstat (limited to 'examples/quick/window/rc_window.py')
-rw-r--r-- | examples/quick/window/rc_window.py | 335 |
1 files changed, 335 insertions, 0 deletions
diff --git a/examples/quick/window/rc_window.py b/examples/quick/window/rc_window.py new file mode 100644 index 000000000..30b1fbf0a --- /dev/null +++ b/examples/quick/window/rc_window.py @@ -0,0 +1,335 @@ +# Resource object code (Python 3) +# Created by: object code +# Created by: The Resource Compiler for Qt version 6.5.0 +# WARNING! All changes made in this file will be lost! + +from PySide6 import QtCore + +qt_resource_data = b"\ +\x00\x00\x05\x12\ +/\ +/ Copyright (C) \ +2021 The Qt Comp\ +any Ltd.\x0d\x0a// SPD\ +X-License-Identi\ +fier: LicenseRef\ +-Qt-Commercial O\ +R BSD-3-Clause\x0d\x0a\ +\x0d\x0aimport QtQuick\ +\x0d\x0aimport QtQuick\ +.Controls\x0d\x0a\x0d\x0aCol\ +umn {\x0d\x0a id: r\ +oot\x0d\x0a spacing\ +: 8\x0d\x0a\x0d\x0a Label\ + {\x0d\x0a text\ +: \x22Total number \ +of screens: \x22 + \ +screenInfo.count\ +\x0d\x0a font.b\ +old: true\x0d\x0a }\ +\x0d\x0a\x0d\x0a Flow {\x0d\x0a\ + spacing:\ + 12\x0d\x0a wid\ +th: parent.width\ +\x0d\x0a\x0d\x0a Repe\ +ater {\x0d\x0a \ + id: screenIn\ +fo\x0d\x0a \ +model: (Qt.appli\ +cation as Applic\ +ation).screens\x0d\x0a\ + Labe\ +l {\x0d\x0a \ + required pr\ +operty string na\ +me\x0d\x0a \ + required pro\ +perty int virtua\ +lX\x0d\x0a \ + required pro\ +perty int virtua\ +lY\x0d\x0a \ + required pro\ +perty var modelD\ +ata // avoid sha\ +dowing Label.wid\ +th and height\x0d\x0a\x0d\ +\x0a \ + lineHeight: 1.5\ +\x0d\x0a \ + text: name + \x22\ +\x5cn\x22 + virtualX +\ + \x22, \x22 + virtualY\ + + \x22 \x22 + modelDa\ +ta.width + \x22x\x22 +\ + modelData.heigh\ +t\x0d\x0a }\ +\x0d\x0a }\x0d\x0a \ + }\x0d\x0a\x0d\x0a Compon\ +ent.onCompleted:\ + {\x0d\x0a var \ +screens = (Qt.ap\ +plication as App\ +lication).screen\ +s;\x0d\x0a for \ +(var i = 0; i < \ +screens.length; \ +++i)\x0d\x0a \ + console.log(\x22s\ +creen \x22 + screen\ +s[i].name + \x22 ha\ +s geometry \x22 +\x0d\x0a\ + \ + screens[\ +i].virtualX + \x22,\ + \x22 + screens[i].\ +virtualY + \x22 \x22 +\ +\x0d\x0a \ + screen\ +s[i].width + \x22x\x22\ + + screens[i].he\ +ight)\x0d\x0a }\x0d\x0a}\x0d\ +\x0a\ +\x00\x00\x04\x8a\ +\x00\ +\x00\x16\xa7x\xda\xcdXYo\xdbF\x10~7\xe0\xff\ +0a_\xec\x06\xba\x93\x17\x15Fa+H\x1d\xc0A\ +b\xcb\xa8\x03\x14}\xa0\xc9\x91\xb8\xf5\x8a+\xec.-\ +9\xae\xff{\x87\xc7\x92\x94\xb8$\xe5ZnJ\x08\x10\ +\xb9;;\xc77\x07g\xd8\xeb\xc1D,\x1f$\x9b\x07\ +\x1a\x8e&\xc70\xec\x0f\x07p\x1d \x5cj\xdaY,\ +\xdd\xf0\x01.\xb4\xdf=<\xe8\xf5`\xfa\xf5\xc3\xb7\xce\ +\x05\xf30T\xd8\xf9\xe4c\xa8\xd9\x8c\xa1\x1cC\xb6v\ +\x85\xb3\xce\xa5\xee\xd0\xb9\x05J\x8f\xb9\x1c\xbe\x5c\xc1\xd9\ +\xf4Cg\xd4\x99p7Rxxpx\xc0\x16K!\ +5\xf1\xbf\x8c\x98w\xb7\xfd\xdc\x9d\x88PK\xc1UL\ +z\xa9\xbf\xdc\xfe\x85\x9e\x86\xc7\xc3\x03\xa0\x8b\xf9c\x90\ +B\xe8\xf4i)\xc5\x12\xa5~\x00\x89$\xc9\xc7\x99\x1b\ +q=]\xba\x1e\x0b\xe7c\x18\xf4\xb7\xa8\xa6\x0fJ\xe3\ +\xe2\x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c\x15'f\xdc\x9d\ +\xd3\xb4v\xa9\xb3\xca\x0a\x7f\x17\xf7\x1f\xf3\x8a\x92\xbe\xe6\ +\xceYy\xe6\xad\xf5\xd3k\x8c\xca\xb5ymXy$\ +\x04\xe5\xa7\xd0.\xb0\x94\xdc\xd34\xb9+\xdf\x02,~\ +\xff,\x22\x85\xa74r7\x09\xae\xb7\xb2\xe5\x95\x9b\xba\ +\xe4\x84\xdc\x88}o4\xc0f]\xea\x9bX\xa3\x88L\ +#%\x0bLioH\x0c\xb1\x16\xcb\x9c\x94\xee\xeb\x09\ +wwQ\xcb\x88\xdc4\x16P\x09\xc55\xd3Pz\x85\ +\xc5\xa5t.\xca+\xb5)>x\xdfo\x04\xbe\xae\xf1\ +\x9f\xc1\xd1s5=\xae+\xe8\xb0\xbf>>\xbe\x90+\ +|\x99\xa8g\xccH\xcf\x8e4\x8e\xb3\x22\xd0\xe2\x87\x1f\ +\x14g\xce\xb7\xfa\xa0\x18\xf5\x9f\x97\x8c\x5c(<\xaa\x7f\ +\x936\x96u\xb5\xe4\xae\x0aLa\x9f&Oe\xfcD\ +x\xcd\x16(\x22\x93\x1a\x1b\x9fUK\x9f}\xb4\x8c0\ +\x97C\xbf\x7f\x00\xe8k\x05\xe6\ +\x00\x00\x04$\ +/\ +/ Copyright (C) \ +2021 The Qt Comp\ +any Ltd.\x0d\x0a// SPD\ +X-License-Identi\ +fier: LicenseRef\ +-Qt-Commercial O\ +R BSD-3-Clause\x0d\x0a\ +\x0d\x0aimport QtQuick\ +\x0d\x0aimport shared\x0d\ +\x0a\x0d\x0a//! [splash-p\ +roperties]\x0d\x0aWind\ +ow {\x0d\x0a id: sp\ +lash\x0d\x0a color:\ + \x22transparent\x22\x0d\x0a\ + title: \x22Spla\ +sh Window\x22\x0d\x0a \ +modality: Qt.App\ +licationModal\x0d\x0a \ + flags: Qt.Spl\ +ashScreen\x0d\x0a p\ +roperty int time\ +outInterval: 200\ +0\x0d\x0a signal ti\ +meout\x0d\x0a//! [spla\ +sh-properties]\x0d\x0a\ +//! [screen-prop\ +erties]\x0d\x0a x: \ +(Screen.width - \ +splashImage.widt\ +h) / 2\x0d\x0a y: (\ +Screen.height - \ +splashImage.heig\ +ht) / 2\x0d\x0a//! [sc\ +reen-properties]\ +\x0d\x0a width: spl\ +ashImage.width\x0d\x0a\ + height: spla\ +shImage.height\x0d\x0a\ +\x0d\x0a Image {\x0d\x0a \ + id: splas\ +hImage\x0d\x0a \ +source: Images.q\ +tLogo\x0d\x0a M\ +ouseArea {\x0d\x0a \ + anchors.\ +fill: parent\x0d\x0a \ + onClic\ +ked: Qt.quit()\x0d\x0a\ + }\x0d\x0a }\ +\x0d\x0a //! [timer\ +]\x0d\x0a Timer {\x0d\x0a\ + interval\ +: splash.timeout\ +Interval; runnin\ +g: true; repeat:\ + false\x0d\x0a \ +onTriggered: {\x0d\x0a\ + spla\ +sh.visible = fal\ +se\x0d\x0a \ +splash.timeout()\ +\x0d\x0a }\x0d\x0a \ + }\x0d\x0a //! [tim\ +er]\x0d\x0a Compone\ +nt.onCompleted: \ +visible = true\x0d\x0a\ +}\x0d\x0a\ +\x00\x00\x03\x08\ +\x00\ +\x00\x0a\xb7x\xda\xadV\xdfo\xda0\x10~G\xe2\x7f\ +\xb8\xe5\x09\xb6\x91\x00\xeb\xa6)}\x986\xaam\x95\xd0\ +\xdaB\xa5uZ\xf7`\x92\x03\xac&v\xe48\x144\ +\xf5\x7f\x9f\x9d\x1f\x8d\x01\x0f\x82\xb6\x08\x89\xdc\xf9\xbb\xfb\ +>\xdbg_<\x0fF<\xd9\x08\xbaXJ\xe8\x8c\xba\ +0\xec\x0f\x07p\xbbD\xb8\x91j$N\x08\xdb\xc0X\ +\x86n\xbb\xe5y0\xbd\xbe\xb8\xeb\x8di\x80,\xc5\xde\ +e\x88L\xd29E\xe1C\xe9\x9b\xe0\xbcw#{*\ +.F\x11P\x12\xc1\xd5\x04>M/zoz\xa3\x88\ +d)\xb6[\xed\x16\x8d\x13.\xa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ei\xac\xaeMu\x00\xd2\xe3\xb4\xf9\xe6\xe9\x12X\x1b\ +eQ\xec\xe3A\x8e\x84\xae\x95\x19j\x1e\xb99N\x93\ +\xc3/\x0a\xb4+\xf9ge\x86\x9daW\x13C\xc8e\ +\xea\xc51t\xb4\x82\x8e%\x00^\xc2\xf0\xad{\xd6\xb5\ +\x06R\x16,\xbb\x87\xd7#\xe2\x0b\x1a\xa8\xad8Qs\ +\x19v}\xaatK\xdc\xbf\xce \xc4\x95j\x85\xe5\x04\ +\x84\xbe\xdc\x8e\xcb/br\x15\x13\x1dar\x1f\xe2\x22\ ++B#2\x8b\x10VT\xc8\x8c\xe8\x15K\x1f$O\ +\x9aP\xe6\xc0\x8fU\x86\xef\xb6\xe2\xda\x05}mPl\ +\x5c-\xa2n\xab\x94\x9d.\xaa\x0c\xb8\xd3:^\x83!\ +\xa4\x1c\xf8q\x90\xdah\xe4\x07\xa8\xf4\x17\x84k\xeb\xf9\ +%\x951Tl|\xc7\xd0a\x0c\xea\xb1#\xa5P6\ +|\xf8?\xc2\x92\xbd\xef\x8c}}\xfb\x98Z\xa6\xbd\x1d\ +\xfdU\xfc\xa0\xaf\x0e\x8b\xc0@\x12\xb6\x88p+\xc3\xa4\ +\xf2\xee\xb6/\xd5;\xb9\xfa\x16t\x04\x86;=\xaal\ +<\xf6\x1bc\xd0\xdf\x06W\xbd)\x0f\xdakg\xeaO\ +\xfd\xfe\x00\x1e\x91\x1e\xa9\ +" + +qt_resource_name = b"\ +\x00\x06\ +\x07\xe0Kg\ +\x00w\ +\x00i\x00n\x00d\x00o\x00w\ +\x00\x0e\ +\x0ei\x17\x5c\ +\x00A\ +\x00l\x00l\x00S\x00c\x00r\x00e\x00e\x00n\x00s\x00.\x00q\x00m\x00l\ +\x00\x0a\ +\x0bi\x98\xbc\ +\x00w\ +\x00i\x00n\x00d\x00o\x00w\x00.\x00q\x00m\x00l\ +\x00\x0a\ +\x08\x90\x1a|\ +\x00S\ +\x00p\x00l\x00a\x00s\x00h\x00.\x00q\x00m\x00l\ +\x00\x11\ +\x02YG\x1c\ +\x00C\ +\x00u\x00r\x00r\x00e\x00n\x00t\x00S\x00c\x00r\x00e\x00e\x00n\x00.\x00q\x00m\x00l\ +\ +" + +qt_resource_struct = b"\ +\x00\x00\x00\x00\x00\x02\x00\x00\x00\x01\x00\x00\x00\x01\ +\x00\x00\x00\x00\x00\x00\x00\x00\ +\x00\x00\x00\x00\x00\x02\x00\x00\x00\x04\x00\x00\x00\x02\ +\x00\x00\x00\x00\x00\x00\x00\x00\ +\x00\x00\x00h\x00\x01\x00\x00\x00\x01\x00\x00\x0d\xcc\ +\x00\x00\x01\x87V\x12\x92R\ +\x00\x00\x00N\x00\x00\x00\x00\x00\x01\x00\x00\x09\xa4\ +\x00\x00\x01\x87V\x12\x92R\ +\x00\x00\x004\x00\x01\x00\x00\x00\x01\x00\x00\x05\x16\ +\x00\x00\x01\x87V\x12\x92R\ +\x00\x00\x00\x12\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\ +\x00\x00\x01\x87V\x12\x92R\ +" + +def qInitResources(): + QtCore.qRegisterResourceData(0x03, qt_resource_struct, qt_resource_name, qt_resource_data) + +def qCleanupResources(): + QtCore.qUnregisterResourceData(0x03, qt_resource_struct, qt_resource_name, qt_resource_data) + +qInitResources() |