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

Резултати

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

Пребарај: #cve

当前筛选 #cve清除筛选
GitHub 红队武器库🚨

@githubredteam · Post #84675 · 18.05.2026 г., 12:00

🚨 GitHub 监控消息提醒 🚨发现关键词:#CVE-2026 📦项目名称:CVE-2026-0596-Reproduction 👤项目作者:SparshBiswas-AI 🛠开发语言: Python ⭐Star数量: 0 | 🍴Fork数量: 0 📅更新时间: 2026-05-18 11:16:45 📝项目描述: Research environment and validation scripts for evaluating deserialization behaviors in MLflow and MLServer. 🔗点击访问项目地址

Hashtags

GitHub 红队武器库🚨

@githubredteam · Post #84646 · 18.05.2026 г., 08:00

🚨 GitHub 监控消息提醒 🚨发现关键词:#CVE-2026 📦项目名称:CVE-2026-31431 👤项目作者:royayub 🛠开发语言: Python ⭐Star数量: 0 | 🍴Fork数量: 0 📅更新时间: 2026-05-18 07:50:50 📝项目描述: Local Privilege Escalation. Flips the running user's UID to 0 in /etc/passwd's page cache, then invokes su for a root shell. 🔗点击访问项目地址

Hashtags

GitHub 红队武器库🚨

@githubredteam · Post #84618 · 18.05.2026 г., 02:00

🚨 GitHub 监控消息提醒 🚨发现关键词:#CVE-2026 📦项目名称:CVE-2026-32683 👤项目作者:ByteWraith1 🛠开发语言: None ⭐Star数量: 0 | 🍴Fork数量: 0 📅更新时间: 2026-05-18 01:46:31 📝项目描述: 无描述 🔗点击访问项目地址

Hashtags

GitHub 红队武器库🚨

@githubredteam · Post #84611 · 18.05.2026 г., 01:00

🚨 GitHub 监控消息提醒 🚨发现关键词:#CVE-2026 📦项目名称:CVE-2026-36438 👤项目作者:kensh1k 🛠开发语言: None ⭐Star数量: 0 | 🍴Fork数量: 0 📅更新时间: 2026-05-18 00:53:47 📝项目描述: This repository contains information about the CVE-2026-36438 🔗点击访问项目地址

Hashtags

GitHub 红队武器库🚨

@githubredteam · Post #84598 · 17.05.2026 г., 22:00

🚨 GitHub 监控消息提醒 🚨发现关键词:#CVE-2026 📦项目名称:CVE-2026-3629 👤项目作者:PySecTools 🛠开发语言: Python ⭐Star数量: 0 | 🍴Fork数量: 0 📅更新时间: 2026-05-17 21:51:34 📝项目描述: WordPress Privilege Escalation Checker 🔗点击访问项目地址

Hashtags

GitHub 红队武器库🚨

@githubredteam · Post #84589 · 17.05.2026 г., 20:00

🚨 GitHub 监控消息提醒 🚨发现关键词:#CVE-2026 📦项目名称:CVE-2026-42945-NGINX-Rift 👤项目作者:Renison-Gohel 🛠开发语言: Python ⭐Star数量: 0 | 🍴Fork数量: 0 📅更新时间: 2026-05-17 19:27:14 📝项目描述: 无描述 🔗点击访问项目地址

Hashtags

GitHub 红队武器库🚨

@githubredteam · Post #84571 · 17.05.2026 г., 16:00

🚨 GitHub 监控消息提醒 🚨发现关键词:#CVE-2026 📦项目名称:CVE-2026-23918-Passive-Audit 👤项目作者:aa022 🛠开发语言: Python ⭐Star数量: 0 | 🍴Fork数量: 0 📅更新时间: 2026-05-17 15:21:09 📝项目描述: Passive HTTP metadata auditor for CVE-2026-23918 exposure triage 🔗点击访问项目地址

Hashtags

GitHub 红队武器库🚨

@githubredteam · Post #84541 · 17.05.2026 г., 10:00

🚨 GitHub 监控消息提醒 🚨发现关键词:#CVE-2026 📦项目名称:CVE-2026-31431-Linux-Copy-Fail 👤项目作者:Dullpurple-sloop726 🛠开发语言: Rust ⭐Star数量: 2 | 🍴Fork数量: 0 📅更新时间: 2026-05-17 09:59:30 📝项目描述: Exploit CVE-2026-31431 on Linux using a Rust implementation to achieve local privilege escalation via an arbitrary page cache write primitive. 🔗点击访问项目地址

Hashtags

GitHub 红队武器库🚨

@githubredteam · Post #84533 · 17.05.2026 г., 07:00

🚨 GitHub 监控消息提醒 🚨发现关键词:#CVE-2026 📦项目名称:public-passwd 👤项目作者:Aurillium 🛠开发语言: Python ⭐Star数量: 0 | 🍴Fork数量: 0 📅更新时间: 2026-05-17 06:55:55 📝项目描述: Use CVE-2026-46333 and CVE-2026-31431 to change any user's password. 🔗点击访问项目地址

Hashtags

GitHub 红队武器库🚨

@githubredteam · Post #84524 · 17.05.2026 г., 02:00

🚨 GitHub 监控消息提醒 🚨发现关键词:#CVE-2026 📦项目名称:palo-alto-cve-2026-0265-checker 👤项目作者:tstephens1080 🛠开发语言: Python ⭐Star数量: 0 | 🍴Fork数量: 0 📅更新时间: 2026-05-17 01:38:37 📝项目描述: Python script to sweep a fleet of Palo Alto firewalls and Panoramas via SSH, check PAN-OS version against CVE-2026-0265 (Authentication Bypass via Cloud Authentication Service), detect whether CAS is actually configured, and report exploitability in a color-coded summary table. 🔗点击访问项目地址

Hashtags

GitHub 红队武器库🚨

@githubredteam · Post #84516 · 17.05.2026 г., 01:00

🚨 GitHub 监控消息提醒 🚨发现关键词:#CVE-2026 📦项目名称:CVE-2026-31431-CopyFail 👤项目作者:Koke-Seas 🛠开发语言: None ⭐Star数量: 0 | 🍴Fork数量: 0 📅更新时间: 2026-05-17 00:31:01 📝项目描述: Entender el CVE-2026-31431 y realizar las siguientes tareas 🔗点击访问项目地址

Hashtags

GitHub 红队武器库🚨

@githubredteam · Post #84504 · 16.05.2026 г., 22:00

🚨 GitHub 监控消息提醒 🚨发现关键词:#CVE-2026 📦项目名称:nGixshell 👤项目作者:MateusVerass 🛠开发语言: Python ⭐Star数量: 0 | 🍴Fork数量: 0 📅更新时间: 2026-05-16 21:15:39 📝项目描述: nginx CVE scanner + RCE exploit framework (CVE-2026-42945 + 16 others) 🔗点击访问项目地址

Hashtags

123•••10•••20•••3031
ПретходнаСтраница 1 од 31Следна