В прошлом посте говоря "Все вызовы теперь одинаковы" я несколько слукавил. Всё-таки есть в этом зоопарке версий некоторая несовместимость вызов которой просто так не унифицировать. Эти моменты вынесены в отдельный модуль QtCompat (compatibility). Там не так много функций но они довольно полезны.
Этот модуль содержит унификаци модуля shiboken2, функций loadUi, translate и несколько переименованных функций классов или изменённую сигнатуру аргументов и возвращаемых значений. Это единственное исключение из правила когда вам потребуется где-то изменить свой код кроме импортов и этот код не похож на обычный код PySide2.
Например, в PyQt4 и PySide есть метод
QHeaderView.setResizeMode
Для PyQt5 и PySide2 они были благополучно переименованы в
QHeaderView.setSectionResizeMode
Чтобы применить этот метод следует использовать такой код
from Qt import QtCompath
header = self.horizontalHeader()
QtCompat.QHeaderView.setSectionResizeMode(header, QtWidgets.QHeaderView.Fixed)
Унификация загрузки UI файлов:
# PySide2
from PySide2.QtUiTools import QUiLoader
loader = QUiLoader()
widget = loader.load(ui_file)
# PyQt5
from PyQt5 import uic
widget = uic.loadUi(ui_file)
# Qt.py
from Qt import QtCompat
widget = QtCompat.loadUi(ui_file)
Хорошо что таких моментов не много и их легко запомнить.
Полный список можно посмотреть в таблице.
#qt#tricks
🇷🇺Rossiya xalq xo‘jaligi va davlat xizmati akademiyasi“Iqtisodiyot va moliya” kafedrasi dotsenti Alisen Alisenovni“Moliyaviy hisob” kursi bo‘yicha tinglovchilar uchun maxsus darsidan video lavha.
#GraduateSchool#Seminar#Finance#Accounting
Web-site |Telegram | Facebook |Instagram
Leapfin Secures $1M in Funding
Leapfin has successfully raised $1 million in funding, set to close on December 17, 2024. The platform focuses on transforming transaction data into high-quality accounting data that is accurate, reliable, and timely. For more information, visit their website: Leapfin.
#Leapfin#Funding#Accounting#Finance#Data
#typescript#accounting#ai_analysis#currency_exchange#expenses#invoices#llm#llm_apps#self_hosted#taxes
TaxHacker is a self-hosted AI app that automates accounting for freelancers and small businesses. Upload receipt photos or invoice PDFs, and it extracts key data like amounts, dates, merchants, taxes, and items, storing them in an easy database with auto-categorization, multi-currency conversion (even crypto), custom fields, and exports. You benefit by saving hours on manual entry, simplifying tax reports, ensuring privacy on your server, and focusing on your work instead of paperwork.
https://github.com/vas3k/TaxHacker
Trump Family Spends Big on Crypto
The Trump family crypto project, World Liberty Financial (WLFI), made significant moves in the crypto market:
- Purchased 10.61 million TRX for 2.65 million USDT.
- Acquired 3,079 ETH for 10 million USDC.
- Converted and staked 4,700 ETH into stETH via Lido, totaling 14,701.58 ETH worth about $49 million.
Check more details here: Onchain Lens.
Additionally, the SEC has rescinded the controversial accounting guidance SAB 121 that affected Bitcoin custody by banks. More insights at Leviathan News and The Block.
#Crypto#Bitcoin#SEC#TRX#ETH#USDC#Ethereum#WorldLibertyFinancial#Lido#stETH#Trump#SAB121#Accounting#Finance#USD#WhaleAlert#USDT
Bitcoin Dominates Market with Huge Gains
Tesla's bitcoin holdings surge to $1.076 billion, boosting GAAP revenue by $600M. 🎉 The Sei Foundation launches a $65M fund for decentralized science startups, while GMCI unveils an index for US crypto protocols. Notably, Texas announces plans for a Bitcoin Reserve.
Read more about Tesla's valuation increase here. Explore the Sei Fund details here and GMCI's index here.
#Bitcoin#Tesla#DeSci#VC#Crypto#Funding#Texas#Cryptocurrency#Investment#MarketTrends#GMCI#Sei#Startups#Blockchain#Protocol#Accounting#Finance#Legislation#Innovation#CryptoProtocol
#typescript#accounting#book_keeping#desktop#double_entry_accounting#electron#frappe#inventory_management#invoicing#javascript#offline#open_source#point_of_sale#vuejs
Frappe Books is a free, open-source accounting software designed to make managing your business finances simple and efficient. It works on Windows, Mac, and Linux, and you can use it offline since it stores data locally on your computer. It offers easy invoicing with customizable templates, tracks payments, and provides important financial reports like profit and loss, balance sheets, and trial balances. The software has a clean, user-friendly interface and features like a dashboard for quick financial insights and a point-of-sale system for retail. This helps you save time, stay organized, and make smarter business decisions without complex tools or extra costs[1][3][4].
https://github.com/frappe/books