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

Резултати

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

Пребарај: #herramienta

当前筛选 #herramienta清除筛选
BotsGram®

@botsgram_cu · Post #5063 · 28.12.2024 г., 01:38

¿Que puede hacer este bot? 🤖@siteshot_bot 📎El bot crea capturas de pantalla web Envía un enlace web y obtén una captura de pantalla de la página. • comprobar enlaces sospechosos (iploggers, sitios web de phishing, estafadores, etc.) • el bot se puede agregar a grupos #Herramienta ( Visto en: @BotsGram_Cu )

Hashtags

BotsGram®

@botsgram_cu · Post #5060 · 27.12.2024 г., 00:58

¿Qué puede hacer este bot? 🤖@ooSearchBot 📎Este bot es una extensión del motor de búsqueda nativo de Telegram. Aquí puedes buscar grupos, canales y bots activos de Telegram. Cada búsqueda te dará hasta 10 000 enlaces. Incluso puedes buscar enlaces privados y publicaciones de mensajes de Telegram. Envíame cualquier palabra clave que te interese y ¡pruébalo ahora! #Herramienta 📌Opinión personal: Una vez que lo uses, no volverás a usar el buscador nativo de Telegram. 10/10⭐️ ( Visto en: @BotsGram_Cu )

Hashtags

BotsGram®

@botsgram_cu · Post #5159 · 29.01.2025 г., 22:38

¿Que puede hacer este bot? 🤖@BHButtons_bot 📎Bot utilizado para crear publicaciones con todo tipo de botones y compartirlas en canales o grupos. También funciona en línea. Soporta texto y multimedia. #Herramienta#Edición ( Visto en: @BotsGram_Cu )

BotsGram®

@botsgram_cu · Post #5066 · 28.12.2024 г., 22:45

¿Que puede hacer este bot? 🤖@ImageResizerNewBot 📎Cambia el tamaño de las imágenes para alcanzar el tamaño de archivo o imagen deseado. #Herramienta#Edición ( Visto en: @BotsGram_Cu )

BotsGram®

@botsgram_cu · Post #5556 · 15.08.2025 г., 14:27

¿Qué puede hacer este bot? 🤖@BajarVideosBot 📎 Este es un potente bot para descargar videos de diferentes plataformas ▪️Sitios soportados: Youtube.com Facebook.com (Cuentas Publicas) TikTok.com Twitter.com Vimeo.comPinterest.com Otros Sitios #Herramienta#Descargar ( Visto en: @BotsGram_Cu )

BotsGram®

@botsgram_cu · Post #5161 · 29.01.2025 г., 22:38

¿Que puede hacer este bot? 🤖@ttloaderbot 📎El bot descarga vídeos de TikTok en la mejor calidad y sin marca de agua. #Descargar#Herramienta ( Visto en: @BotsGram_Cu )

BotsGram®

@botsgram_cu · Post #5145 · 23.01.2025 г., 23:57

¿Que puede hacer este bot? 🤖@VideoDownloadBot 📎El bot te permite descargar vídeos de TikTok, YouTube, VK, Instagram, Twitter y de otros 700 sitios. #Descargar#Herramienta ( Visto en: @BotsGram_Cu )

BotsGram®

@botsgram_cu · Post #5109 · 10.01.2025 г., 19:31

¿Que puede hacer este bot? 🤖@YtbDownBot 📎Soy YTBdownbot . Puedo descargar videos de YouTube y TikTok . El bot funciona directamente y en los chats . Agrega el bot a un grupo, luego envía el enlace del video y el bot enviará el video al chat. #Descargar#Herramienta ( Visto en: @BotsGram_Cu )

BotsGram®

@botsgram_cu · Post #5082 · 01.01.2025 г., 22:15

¿Que puede hacer este bot? 🤖@TGStoryXBot 📎Puede descargar fácilmente historias de Telegram y publicaciones archivadas de cualquier usuario en alta calidad y velocidad a través de su enlace. #Descargar#Herramienta ( Visto en: @BotsGram_Cu )

BotsGram®

@botsgram_cu · Post #5075 · 30.12.2024 г., 22:25

¿Que puede hacer este bot? 🤖@Kitefileupbot 📎Con este bot podrás descargar contenido de múltiples sitios en varios formatos y escucharlo en cualquier momento sitios web compatibles: (youtube, instagram, facebook, twitter, tiktok, likee, pinterest, snapchat). #Descargar#Herramienta ( Visto en: @BotsGram_Cu )

BotsGram®

@botsgram_cu · Post #5073 · 30.12.2024 г., 22:25

¿Que puede hacer este bot? 🤖@instaAnalysisBot 📎El bot te enviará historias de los usuarios que sigues en Instagram. Sin una VPN, de forma anónima, todas las publicaciones permanecerán en tu chat y podrás volver a ellas en cualquier momento. #Instagram#Herramienta ( Visto en: @BotsGram_Cu )

BotsGram®

@botsgram_cu · Post #5044 · 23.12.2024 г., 23:02

🤖@Pdot_ru_bot 📎chatbot GPT gratuito Características del robot: ✅ genera fotos y videos ✅ escribe códigos, textos, compone poesía ✅ trabaja con documentos ✅ reconoce lo que hay en la imagen Desarrollado por GPT-4o y DALLE #IA#Herramienta ( Visto en: @BotsGram_Cu )

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