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

TGINSIGHT SIMILAR POSTS

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

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

Установить свойства виджета в PySide можно не только через соответствующие методы и конструктор класса. Можно их изменять с помощью метода setProperty по имени. btn = QPushButton("Click Me") btn.setProperty("flat", True) Это аналогично вызову btn.setFlat(True) Если указать несуществующее свойство, то оно просто создается btn.setProperty("btnType", "super") Получить его значение можно методом .property(name) btn_type = btn.property("btnType") Когда это может быть полезно? ▫️Можно просто хранить какие то данные в виджете и потом их доставать обратно widget = QWidget() widget.setProperty('my_data', 123) print(widget.property('my_data')) ▫️ Назначая эти свойства разным виджетам можно потом отличить виджеты во время итераци по ним. Например, найти все кнопки со свойством my_data="superbtn". Но ведь вместо кастомного свойства можно использовать objectName, будет тот же результат. Да, но y ObjectName есть ограничение - только строки. ▫️ Если нам потребуется не просто поиск а, например, сортировка по числу, то свойства позволяют нам это сделать. Поддерживается любой тип данных widget.setProperty('my_data', {'Key': 'value'}) widget.setProperty('order', 1) all_widgets.sort(key=w: w.property('order')) Но ведь Python позволяет всё вышеперечисленное сделать простым созданием атрибута у объекта widget.order = 1 widget.my_data = 123 Да, но я думаю что не надо объяснять почему не стоит так делать. К тому же, если у виджета нет свойства то метод .property(name) вернет None, а отсутствующий атрибут выбросит исключение. ▫️ Действительно полезное применение кастомным свойствам - контроль стилей. Здесь атрибутами не обойтись, нужны именно свойства. Дело в том, что в селекторах стилей можно указывать конкретные свойства виджетов на которые следует назначать стиль. Просто запустите этот код from PySide2.QtWidgets import * if __name__ == "__main__": app = QApplication([]) widget = QWidget(minimumWidth=300) layout = QVBoxLayout(widget) btn1 = QPushButton("Action 1") btn2 = QPushButton("Action 2") btn3 = QPushButton("Action 3", flat=True) layout.addWidget(btn1) layout.addWidget(btn2) layout.addWidget(btn3) # добавим кастомное свойство одной кнопке btn1.setProperty("btnType", "super") # добавляем стили widget.setStyleSheet( """ QPushButton[btnType="super"] { background-color: yellow; color: red; } QPushButton[flat="true"] { color: yellow; } """ ) widget.show() app.exec_() С помощью селектора мы избирательно назначили стили на конкретные кнопки. Как получить список всех кастомный свойств? Функция получения списка кастомных свойств отличается от получения дефолтных. def print_widget_dyn_properties(widget): for prop_name in widget.dynamicPropertyNames(): property_name = prop_name.data().decode() property_value = widget.property(property_name) print(f"{property_name}: {property_value}") #tricks#qt

Hashtags

Резултати

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

Пребарај: #installer

当前筛选 #installer清除筛选
Libreware

@libreware · Post #1582 · 25.04.2026 г., 15:55

MicroGPlus Easy #MicroG#installer https://bitgapps.io/extra.html https://t.me/MicroGPlusChat microG is a free and open-source implementation of Google Play Services. It aims to provide a functional replacement for proprietary Google services on #Android devices. It allows users to run applications that depend on #Google Play Services.

Libreware

@libreware · Post #936 · 28.04.2021 г., 11:52

MinMicroG MicroG installer v2.10 28th april, 2021 By MOVZX and FatherJony and FriendlyNeighborhoodShane ⚠️ Check the guide called README.md inside the zips ⚠️ There's not much to update, unsurprisingly. I just wanted to make sure this thing still works. Changelog: - Update MicroG - Update AuroraSuite - Switch LocalGSM NLP backend back to the now-maintained FDroid build - Support addon.d v2 for newer A/B devices Check release notes for troubleshooting the self-check problems. ⬇️ Downloads: https://github.com/FriendlyNeighborhoodShane/MinMicroG_releases/releases/tag/2021.04.28 Build scripts and instructions: https://github.com/FriendlyNeighborhoodShane/MinMicroG 📡@NoGoolag #minmicrog#microg#installer

Libreware

@libreware · Post #1026 · 20.01.2022 г., 18:13

Anarchy-Droid One-Click Android rom installation assistant Anarchy-Droid is an application designed to help you install custom roms on your Android device. It is supposed to make the process of finding, downloading and installing a rom (with addons like F-Droid and microG) as easy as possible. The primary audience is all the folks who do not really know anything about Android, TWRP or roms, but still would like to run a free, open-source and non-bloated Android on their devices. Using a free after-market rom like LineageOS should not be restricted to the few people with enough technical know-how to do the complex installation procedure all by themselves. Anarchy-Droid is available for Windows, Mac and Linux. As of now, it should be working fine with many Samsung, OnePlus, Motorola, NVidia and Sony devices and with all other devices that already have TWRP installed. Anarchy-Droid is the successor of Free-Droid which has been fully rewritten from scratch in go. https://anarchy-droid.com https://github.com/amo13/Anarchy-Droid 📡@NoGoolag📡@Libreware #anarchydroid#rom#microg#installer

Libreware

@libreware · Post #1586 · 07.05.2026 г., 02:15

microG Installer Revived.... again by spacebarred Based on nift4's microG Installer Revived 🚀 Convert your microG to a system app for better Play Integrity results! This module promotes your installed microG to '/priv-app', where it: ✅ Gains privileged permissions like real Play Services ✅ Looks more “stock” to Play Integrity checks ✅ Gets system-level access needed for attestation ✅ More closely mimics a genuine Google Services setup • Features a fully built-in KernelSU/WebUI X interface. • Built-in downloader fetches the latest microG & Companion directly from GitHub. • Dynamically promotes whatever versions you install — no more waiting for module updates to match APKs! 📦 QUICK INSTALL 1. Flash this module via #Magisk or #KernelSU and Reboot. 2. Open the module's WebUI inside your root manager. 3. Go to the "Installer" tab to download & install microG GmsCore + Companion. 4. Go to the "Home" tab and long-press "Promote" to push them to the system level. 5. Reboot → Grant permissions in microG Settings. ✅ REQUIREMENTS • Signature spoofing enabled in your ROM • No Google services installed • Magisk v20.4+ or KernelSU • For KSU: A valid mount metamodule installed (e.g., magic mount, mountify, overlayfs) ❌ WON’T WORK ON: • Most stock ROMs (no sig spoofing support) • Devices with GApps installed 📖 Full guide & source: github.com/spacealtctrl/microg_installer_revived_again ⬇️ Downloads: https://github.com/spacealtctrl/microg_installer_revived_again/releases 🔧 Personal project — updated when possible. Join testing group: t.me/microGRevivedAgainResults #microg#installer

GitHub Trends

@githubtrending · Post #15114 · 03.09.2025 г., 07:30

#kotlin#android#apk#apks#dhizuku#installer#root#shizuku InstallerX Revived is a free, open-source Android app installer that replaces your phone’s default installer with a more powerful and customizable one. It supports many file types like apk, apks, xapk, and zip with multiple apps inside. You get features like batch installs, automatic deletion of install files, and options to block certain apps from installing. It works on Android 7 to 16 and offers a modern interface with language support. This installer improves installation speed, fixes bugs, and lets you control installation settings for a smoother, safer app installation experience. It’s community-maintained and respects your privacy. https://github.com/wxxsfxyzm/InstallerX-Revived

GitHub Trends

@githubtrending · Post #15104 · 30.08.2025 г., 12:00

#shell#alpine#alpine_linux#boot#distro#grub#installer#iso#linux#linux_distribution#liveos#netboot#netinst#netinstall#operating_systems#os#reinstall#shell_script#vps#windows You can use a powerful script to easily reinstall Linux or Windows on your server with just one command. It supports 19 popular Linux versions and all Windows versions from Vista to Windows 11, automatically downloading official ISO files and drivers. It works for switching between Linux and Windows, handles different network setups without manual IP input, and supports BIOS, EFI, and ARM servers. The script is lightweight, safe, and fetches all resources live from official sources. This saves you time and effort in system installation or reinstallation, especially on low-memory or cloud servers. You can also customize passwords, SSH keys, and ports during installation. https://github.com/bin456789/reinstall