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

Резултати

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

Пребарај: #darkweb

当前筛选 #darkweb清除筛选
Repositorio data science

@repo_science · Post #3691 · 04.11.2023 г., 02:49

#hacking#darkweb 👽 Dark Web 101 : Anonymous and Secure Browsing 2023 A guide to gaining knowledge about the Dark Web, Deep Web, Cryptocurrencies, Anonymity, and Security. 🗣Shubhang Prajapati 📆5/2023 🌐English ----- Main channel: @repo_science Coupons: @freecoupons_reposcience -----

🇬🇧Dark Web #01 🇷🇺Паутина Тьмы #01 Два самых известных клона вернулись, чтобы забрать то, что принадлежит им по праву. Бен Рейли и Мэделин Прайор сыты по горло и снова разжигают АД! Человек-Паук и Люди Икс не готовы к грядущему, и пока непонятно, какую роль во всём этом играет Веном? Солнце садится, приближаются сумерки, а ночь обещает быть долгой. #комикс#comics#паутинатьмы#darkweb #чтиводня

GitHub Trends

@githubtrending · Post #15234 · 18.10.2025 г., 11:30

#other#cti#cyberhunter#darkweb#deepweb#threat_intelligence deepdarkCTI is a free project that collects and shares cyber threat intelligence (CTI) from the deep and dark web, helping you stay aware of hidden cyber threats like stolen data, ransomware, and hacker activities. It gathers information from places like Telegram, Discord, hacker forums, and ransomware sites to provide useful indicators and patterns of cyber attacks. You can join their Telegram group to discuss and suggest new sources or support the project with donations. Using deepdarkCTI helps you detect threats early, improve your cybersecurity decisions, and protect your organization from cyber attacks more effectively. https://github.com/fastfire/deepdarkCTI

GitHub Trends

@githubtrending · Post #15364 · 24.12.2025 г., 11:30

#python#ai_tool#darkweb#darkweb_osint#investigation_tool#llm_powered#osint#osint_tool Robin is an AI tool that searches and scrapes the dark web, refines queries with large language models, filters results, and produces a concise investigation summary you can save or export, with Docker and CLI options and support for multiple LLMs (OpenAI, Anthropic, Gemini, local models) to fit your workflow. This helps you save hours of manual searching by automating multi-engine dark-web searches, scraping Onion sites via Tor, filtering noise with AI, and producing ready-to-use reports for faster, more focused OSINT investigations. https://github.com/apurvsinghgautam/robin

Crypto M - Crypto News

@CryptoM · Post #65165 · 11.04.2026 г., 14:20

🚀 Heart South Reports Potential Data Breach Affecting Thousands Heart South has announced that approximately 46,666 individuals may have been affected by a data breach, with patient information from its network appearing on the dark web. According to NS3.AI, the company has been unable to verify if any specific individual's data was compromised. Notifications regarding the potential breach began being distributed in April 2026. #HeartSouth#databreach#patientdata#darkweb#NS3AI#privacy#cybersecurity#datasecurity#breachnotification#April2026