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

Резултати

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

Пребарај: #deployment

当前筛选 #deployment清除筛选
djangoproject

@djangoproject · Post #526 · 19.12.2017 г., 20:13

https://goo.gl/XT2vGj Anaconda Enterprise 5 new capabilities include: Integrated #data_science experience for the entire organization Collaboration and reproducibility with JupyterLab and #Anaconda Project One-click data science #deployment Scalable architecture for on-premises and cloud deployments

djangoproject

@djangoproject · Post #235 · 18.01.2017 г., 17:27

http://www.aparat.com/v/Cjarf Happy Asset Deployments With Webpack & Django by Scott Burns Webpack What is it? What does it do? Source transformations Output Why #Djangos collectstatic is not up to the job? Must run after #deployment Doesn't do all the things Slow Integration on both sides Webpack bundle tracker to output build stats Django #Webpack bundle loader to read those files How to render links in templates.

MDC Uzbekistan

@mdcuzbekistan · Post #670 · 03.03.2023 г., 18:21

Github actions dan foydalanib CI/CD qilish Do'stlar, avvalgi mavzularimizda Windows server bilan to'g'ridan to'g'ri ishlab, .NET ilovalarimizni deploy qilishni ko'rib chiqdik. O'ylaymizki, siz CI/CD haqida eshitgansiz. Masalan, Heroku servislaridan deployment uchun foydalangansiz, esingizda bo'lsa u yerda CI/CD sozlamalari qilingan edi. Ya'ni github/gitlab/azuredevops ga push qilish orqali, loyihamiz avtomatik tarzda build -> test -> deploy -> run bo'lardi. Ushbu mavzuni kengroq o'rganishimiz uchun Abduvohid ustozni mahorat darsimizga taklif qildik. Barchangizni ushbu mahorat darsida kutib qolamiz. Kirsangiz xursand bo'lamiz, kirmasangiz hafa bo'lish yo'q ) Sana: 5-mart, 20:00 Havola: Zoom Speaker: Wahid Abduhakimov #githubactions#deployment#cicd .NET Uzbekistan Community ➖➖➖➖➖➖➖➖➖➖ Telegram | Instagram | Youtube

GitHub Trends

@githubtrending · Post #15312 · 06.12.2025 г., 12:00

#go#containers#deployment#devops#docker#docker_compose#golang#hacktoberfest#kubernetes#orchestration#self_hosted Uncloud lets you run and manage web apps across multiple servers (cloud, home, or bare metal) as easily as using Docker Compose, but with production features like zero-downtime updates, automatic HTTPS, and cross-machine scaling. It connects your machines into a secure, private network without needing a central control server, so there’s less to manage and no single point of failure. You keep full control of your infrastructure and data, avoid vendor lock-in, and get a simple, cloud-like experience without the complexity of Kubernetes. https://github.com/psviderski/uncloud

Venture Village Wall 🦄

@venturevillagewall · Post #3486 · 19.12.2024 г., 13:57

Coblocks Secures $500K Funding Coblocks has successfully raised $500K in funding as of December 4, 2024. The platform offers unified tooling, instant deployment, and seamless collaboration in one streamlined solution. #Coblocks#Funding#Tech#Startup#Platform#Collaboration#Deployment#Innovation#Investment#Tools#Startups#InvestmentRound#FundingRound#Financing#Growth#Technology#Business#Software#Solutions#Digital