TGTGInsighttelegram intelligenceLIVE / telegram public index
← Python Заметки

TGINSIGHT SIMILAR POSTS

Најди сличен содржај

Изворен канал @pythonotes · Post #380 · 21 окт.

Регулярно приходится писать и ревьюить код, где используется PySide2-6. Заметил, что в подавляющем большинстве случаев настройка создаваемых базовых виджетов происходит через методы. Думаю, всем знаком такой способ. Простой пример с кнопкой: button = QPushButton("Click Me") button.setMinimumWidth(300) button.setFlat(True) button.setStyleSheet("font-size: 20pt") button.setToolTip("Super Button") button.clicked.connect(lambda: print("Button clicked")) Но есть и альтернативный способ - настройка через свойства. Это просто ключевые аргументы конструктора класса. Хоть они и не указаны в документации как аргументы, но они есть) Этот код делает тоже самое но с помощью Property button = QPushButton( "Click Me", minimumWidth=300, flat=True, styleSheet="font-size: 20pt", toolTip="Super Button", clicked=lambda: print("Button clicked"), ) Где это может быть полезно ▫️ Это выглядит более аккуратно и коротко, уже повод использовать ▫️ Может использоваться в заполнении лейаута, когда нам не нужно никакое другое взаимодействие с виджетом и поэтому сохранять его в переменную не требуется. Например, лейбл или кнопка. widget = QWidget(minimumWidth=400) layout = QHBoxLayout(widget) layout.addWidget(QLabel("Button >", alignment=Qt.AlignRight)) layout.addWidget(QPushButton("Click Me", clicked=lambda: print("Button clicked"))) widget.show() Либо так widget = QWidget(minimumWidth=400) layout = QHBoxLayout(widget) for wd in ( QLabel("Button >", alignment=Qt.AlignRight), QPushButton("Click Me", clicked=lambda: ...) ): layout.addWidget(wd) widget.show() ▫️ Можно хранить настройки в каком-то конфиге или генерировать на лету, после чего передавать как kwargs. kwargs = {"text": "Hello " * 30, "wordWrap": True} my_label = QLabel(**kwargs) Как получить полный список доступных свойств? Эта функция распечатает в терминал все свойства виджета и их текущие значения def print_widget_properties(widget): meta_object = widget.metaObject() for i in range(meta_object.propertyCount()): property_ = meta_object.property(i) property_name = property_.name() property_value = property_.read(widget) print(f"{property_name}: {property_value}") #tricks#qt

Hashtags

Резултати

Пронајдени 30 слични објави

Пребарај: #infinityx

当前筛选 #infinityx清除筛选
Xiaomi 12T Pro | K50U | Updates

@xiaomi_12tpro_updates · Post #327 · 09.05.2025 г., 01:45

#InfinityX#qpr2#Diting#A15 Project InfinityX - v2.8 | Android 15 Released: 8/05/2025 ▪️Gapps: Gdrive ▪️Vanilla: Gdrive ▪️Recovery: Ofox ▪️Screenshots Notes: It is recommended to use ofox recovery if you are flashing via fastboot. fastboot flash recovery_ab recovery.img Changelogs: • Synchronized with the latest changes • Device integrity passes (signed build) • fixed the problem with freezing when the battery reaches 5%? • KernelSU Support • Firmware included • Dolby Audio by default • HyperOS Camera by default Credits: Thanks to @TeamMEX_XDA❤️ Thanks to @zED141 for giving me space on gdrive By@Jezzay97 | Donate Follow@xiaomi_12tpro_updates Join@xiaomi12tpro_chat

Xiaomi 12T Pro | K50U | Updates

@xiaomi_12tpro_updates · Post #323 · 03.05.2025 г., 20:09

#InfinityX#qpr2#Diting#A15 Project InfinityX - v2.7 HotFix | Android 15 Released: 3/05/2025 ▪️Gapps: Mirror | Gdrive ▪️Vanilla: Mirror | Gdrive ▪️Recovery: Ofox ▪️Screenshots Notes: It is recommended to use ofox recovery if you are flashing via fastboot. fastboot flash recovery_ab recovery.img Changelogs: • Synchronized with the latest changes • Device integrity passes (signed build) • Fixed the error when installing gapps due to missing partition. • Slot 2 problem for Sim cards solved • Firmware included • Dolby Audio by default • HyperOS Camera by default • and many more changes... Credits: Thanks to @TeamMEX_XDA❤️ Thanks to @zED141 for giving me space on gdrive By@Jezzay97 | Donate Follow@xiaomi_12tpro_updates Join@xiaomi12tpro_chat

Xiaomi 12T Pro | K50U | Updates

@xiaomi_12tpro_updates · Post #321 · 03.05.2025 г., 07:32

#InfinityX#qpr2#Diting#A15 Project Infinity X - v2.7 | Android 15 Released: 3/05/2025 ▪️Gapps: Mirror | SF ▪️Vanilla: Mirror | SF ▪️Screenshots Notes: • Synchronized with the latest changes • Device integrity passes (signed build) • Thermal menu was removed for now • Remove some ARM blobs • Now with oss kernel • Fixed some vibration bugs. now works 100%. • Added KernelSU support • Improved performance • Firmware included • Dolby Audio by default • HyperOS Camera by default • and many more changes... Credits: Thanks to @TeamMEX_XDA❤️ By@Jezzay97 | Donate Follow@xiaomi_12tpro_updates Join@xiaomi12tpro_chat

Xiaomi 12T Pro | K50U | Updates

@xiaomi_12tpro_updates · Post #314 · 20.04.2025 г., 04:56

#InfinityX#qpr2#Diting#A15 Project Infinity X - v2.7 | Android 15 Released: 20/04/2025 ▪️Download: Mirror | SF ▪️Screenshots Notes: • Synchronized with the latest changes • Device integrity passes (signed build) • Workaround for voip audio routing issue using a monitoring service (Whatsapp calls on speakerphone fixed) • Firmware included and updated • Gapps build only • Dolby Audio by default • HyperOS Camera by default By@Jezzay97 | Donate Follow@xiaomi_12tpro_updates Join@xiaomi12tpro_chat

Xiaomi 12T Pro | K50U | Updates

@xiaomi_12tpro_updates · Post #312 · 17.04.2025 г., 17:36

#InfinityX#qpr2#Diting#A15 Project Infinity X - v2.7 | Android 15 Released: 17/04/2025 ▪️Download: Mirror | SF ▪️Screenshots ▪️Changelog Notes: • Synchronized with the latest changes • Device integrity passes (signed build) • Gapps build only • Dolby Audio by default • HyperOS Camera by default By@Jezzay97 | Donate Follow@xiaomi_12tpro_updates Join@xiaomi12tpro_chat

Xiaomi 12T Pro | K50U | Updates

@xiaomi_12tpro_updates · Post #308 · 13.04.2025 г., 06:08

#InfinityX#qpr2#Diting#A15 Project Infinity X - v2.7 | Android 15 Released: 13/04/2025 ▪️Download: Mirror | SF ▪️Screenshots ▪️Changelog Notes: • Device integrity passes (signed build) • Gapps build only • Dolby Audio by default • HyperOS Camera by default By@Jezzay97 | Donate Follow@xiaomi_12tpro_updates Join@xiaomi12tpro_chat

Oneplus 13 Updates

@OnePlus13Series · Post #386 · 05.05.2026 г., 16:37

Project InfinityX v3.10 - Official | Android 16 | OnePlus 13 ‼️ ARB ‼️ ⬇️ Download: Here ✏️ Flashing Instructions: Here 📸 Screenshots: Here 📝 Device Changelogs: Here 05/05/2026 - Synced with latest source - Initial official release 📝 Source Changelogs: Here 👤 Maintainer: @Whyred_404 🔔 Updates: @OnePlus13Series 💬 Discussion: @OnePlus13SeriesChatRoom 🔖 Tags: #development#rom#infinityX#official

Nothing Phone (2) | Updates

@NothingPhone2Updates · Post #483 · 05.12.2024 г., 19:24

Project Infinity X - Official | A15| Nothing Phone 2 (Pong) 📝 Details: - Version: v2.2 - Device: #Pong - Released: 06/12/24 ⬇️ Download: Here 📖 Changelogs: Device | Source 📔 Instructions: Here 🎄 Device tree : Here 🖼 Screenshot : here 🆘 Support: Device 🏷 Tags: #AOSP#ROM#InfinityX#U#Official ✍️ Note: • Initial Android 15 • Clean flash recommended • Base firmware 2.6.0 is recommended • Dolby Atmos available • ksu patched 🏆 Credits: - Chandu Dyavanapelli for DT Base - Fabian and Hellboy for Glyph Implementation 👤 Maintainer: @Ghosutox 🔔 Updates: @NothingPhone2Updates 🐙 Chat: @NothingPhone2

Nothing Phone (2) | Updates

@NothingPhone2Updates · Post #699 · 14.12.2025 г., 04:25

Project Infinity X - Official | A16 | Nothing Phone 2 (Pong) (EOL) 📝 Details: - Version: v3.5 (EOL) - Device: #Pong - Released: 13/12/'25 ⬇️ Download: Here 📖 Changelogs: Device | Source 📔 Instructions: Here 🖼 Screenshot : Here 🆘 Support: Device 💰 Donation: steinsgate007@axl | BMC 🏷 Tags: #AOSP#ROM#InfinityX#V#Official ✍️ Note: • Base firmware 4.0 is recommended • If face any bugs report with logs • Dolby and initial Nothing camera support available • ksu not prepatched 🏆 Credits: - Hellboy for kernel - Fabian and Hellboy for Glyph Implementation 👤 Maintainer: @Ghosutox 🔔 Updates: @NothingPhone2Updates 🐙 Chat: @NothingPhone2

Nothing Phone (2) | Updates

@NothingPhone2Updates · Post #687 · 21.10.2025 г., 04:43

Project Infinity X - Official | A16 | Nothing Phone 2 (Pong) 📝 Details: - Version: v3.3 - Device: #Pong - Released: 20/10/'25 ⬇️ Download: Here 📖 Changelogs: Device | Source 📔 Instructions: Here 🖼 Screenshot : Here 🆘 Support: Device 💰 Donation: steinsgate007@axl | BMC 🏷 Tags: #AOSP#ROM#InfinityX#V#Official ✍️ Note: • Base firmware 3.2 is recommended • Clean flash recommended • If face any bugs report with logs • Dolby and initial Nothing camera support available • WFD broken • ksu pre-patched 🏆 Credits: - Hellboy for kernel - Fabian and Hellboy for Glyph Implementation 👤 Maintainer: @Ghosutox 🔔 Updates: @NothingPhone2Updates 🐙 Chat: @NothingPhone2

Nothing Phone (2) | Updates

@NothingPhone2Updates · Post #676 · 22.09.2025 г., 09:25

Project Infinity X - Official | A16 | Nothing Phone 2 (Pong) 📝 Details: - Version: v3.2 - Device: #Pong - Released: 22/09/'25 ⬇️ Download: Here 📖 Changelogs: Device | Source 📔 Instructions: Here 🖼 Screenshot : Here 🆘 Support: Device 💰 Donation: steinsgate007@axl | BMC 🏷 Tags: #AOSP#ROM#InfinityX#V#Official ✍️ Note: • Base firmware 3.2 is recommended • If face any bugs report with logs • Dolby and initial Nothing camera support available • WFD broken • ksu pre-patched 🏆 Credits: - Hellboy for kernel - Fabian and Hellboy for Glyph Implementation 👤 Maintainer: @Ghosutox 🔔 Updates: @NothingPhone2Updates 🐙 Chat: @NothingPhone2

Nothing Phone (2) | Updates

@NothingPhone2Updates · Post #659 · 10.08.2025 г., 18:37

Project Infinity X - Official | A16 | Nothing Phone 2 (Pong) 📝 Details: - Version: v3.1 - Device: #Pong - Released: 10/08/'25 ⬇️ Download: Here 📖 Changelogs: Device | Source 📔 Instructions: Here 🖼 Screenshot : Here 🆘 Support: Device 💰 Donation: steinsgate007@axl | BMC 🏷 Tags: #AOSP#ROM#InfinityX#V#Official ✍️ Note: • Base firmware 3.2 is recommended • If face any bugs report with logs • Dolby and initial Nothing camera support available • WFD broken • ksu pre-patched 🏆 Credits: - Hellboy for kernel - Fabian and Hellboy for Glyph Implementation 👤 Maintainer: @Ghosutox 🔔 Updates: @NothingPhone2Updates 🐙 Chat: @NothingPhone2

ПретходнаСтраница 1 од 3Следна