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

Резултати

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

Пребарај: #scams

当前筛选 #scams清除筛选
TONlines – News

@tonlines · Post #6986 · 30.04.2025 г., 14:21

Tonnel Network: Caution with B-Day Candle Purchases #Tonnel#scams The Tonnel Network warns users about scams involving the purchase of B-Day Candles. It is advised to only buy candles that are mintable, indicated by a blue glow. Source: link @tonlines

News and Tips

@NewsAndTipsNT · Post #3508 · 24.07.2025 г., 15:46

⚠️Dear subscribers, Please don’t fall for cheap tricks. There's been a rise in NFT-related #scams on Telegram lately. If anyone messages you asking to connect certain apps, don’t fall for it , it’s clearly a scam. Never connect your wallet to unknown sources just for the sake of giveaways or so-called "free" #gifts. Remember, nothing is truly free. Also, some channels are using unhealthy giveaway methods to collect user data or trick people into spending money. Think carefully before participating — if you're not comfortable with it, don't spend your money. Here are some safe ways to buy and sell Telegram #NFTs: 1. Buy directly from Telegram: Go to ⚙Settings > 🎁 Buy a Gift. Drops appear randomly, check often and buy when available. You can later upgrade them to NFTs when the option is available. 2. Use Telegram’s built-in buy/sell option: You can trade NFTs securely within the app. ⚙Settings : 🎁Buy a gift : Resale 3. Visit Fragment: A trusted and official platform for buying and selling Telegram collectibles. 4. Use third-party platforms like @Portals/@Tonnel_Network_bot : Reputable web apps can also be used, but make sure they are trustworthy and secure. Stay smart and stay safe!🤝

Venture Village Wall 🦄

@venturevillagewall · Post #4296 · 03.03.2025 г., 16:00

Crypto Fundraising Soars 93.5% in 2024 In 2024, crypto and blockchain startups raised $15.4B, marking a 93.5% increase from 2023. Closed funding rounds reached 1,597, a 45% jump. Early rounds make up 36% of deals. Top VCs include Animoca Brands, OKX Ventures, and MH Ventures. Bitcoin Update: Despite a drop in February, Bitcoin surged 9.3% in March. Currently priced at approximately $91,000. SEC News: SEC drops lawsuit against Kraken, reducing regulatory pressures on the market. US Senate set to vote on IRS rule affecting crypto & DeFi. Scam Alert: Nine residents in Kent, UK lost £1.2M to scammers using personal data to impersonate police. For detailed insights, visit: Alef Aeronautics | Bitcoin Price Update | SEC Lawsuit Info #Crypto#VC#Bitcoin#SEC#Regulation#Tether#USDC#Investments#EarlyStage#Scams#Blockchain#Funding

Venture Village Wall 🦄

@venturevillagewall · Post #3852 · 12.01.2025 г., 01:00

Investigation Reveals Unusual Money Practices An investigation by Rekt News uncovers hardcoded lies and collapsing pegs in the crypto market, with implications that a founder may be manipulating the situation from both sides. Full details in the report: Rekt News #Crypto#Investigation#Finance#MarketTrends#RektNews#LeviathanNews#Blockchain#DeFi#Web3#Trading#Scams

Venture Village Wall 🦄

@venturevillagewall · Post #3894 · 16.01.2025 г., 16:00

Burwick Law Suing Pump.fun Over Losses ⚖️ Burwick Law to file suit against Pump.fun on behalf of investors who lost significant sums in meme coin platform. Legal experts criticize the dominance of scams and speculative assets in crypto. 📊 6.1M tokens launched with total raised nearing $2.3M. More details here. #Crypto#Law#PumpFun#Investors#MemeCoins#Scams#Investments#Litigation#Finance#BurwickLaw

Venture Village Wall 🦄

@venturevillagewall · Post #3938 · 21.01.2025 г., 13:00

Massive USDC Minting and Meme Coin Scam 🚨 50M USDC minted at USDC Treasury, totaling $50.05M. Meanwhile, investors are falling victim to a scam involving fake Trump-related meme coins. Beware of various tokens like BARRON and IVANKA that are misleadingly launched under false pretenses, all funnelling funds to a scam wallet. ⚠️ Over 600 such tokens already spotted! More details here. AI funding news: - Qventus: $85M for AI healthcare ops. - Prophecy.io: $47M for data pipeline solutions. - Gesynta Pharma: $27.27M for new drugs. - Leap Services: $20M for omnichannel retail platform. - NeuroBionics: $5M for advancing neurotech. - Atlantic Sea Farms: $3.80M for sustainable seaweed farming. Find more funding details in the summary! #USDC#Crypto#AI#Funding#MemeCoins#Scams#Healthcare#Data#Pharma#Retail#Neurotech#Seafood#Tech#Investments#Investing#Finance#Blockchain