В прошлом посте говоря "Все вызовы теперь одинаковы" я несколько слукавил. Всё-таки есть в этом зоопарке версий некоторая несовместимость вызов которой просто так не унифицировать. Эти моменты вынесены в отдельный модуль 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
🚀 AI TRENDS | Tether Launches QVAC SDK for Cross-Platform AI Development
Tether has introduced the QVAC SDK, a unified software development kit designed to enable developers to build, run, and fine-tune AI applications directly on any device. According to Foresight News, this SDK ensures consistency across different environments.
Applications developed using the QVAC SDK can seamlessly operate on platforms such as iOS, Android, Windows, macOS, and Linux. The same codebase can function across all supported environments without the need for platform-specific branches, rewrites, or conditional logic.
The QVAC SDK is built on QVAC Fabric, a branch of llama.cpp, offering broad compatibility with the llama.cpp model ecosystem for text generation, embedding, and multimodal workloads.
#AI#SDK#CrossPlatform#MachineLearning#LlamaCpp#SoftwareDevelopment#Multimodal#QVAC
#python#agents#generative_ai_tools#llamacpp#llm#onnx#openvino#parsing#retrieval_augmented_generation#small_specialized_models
llmware is a powerful, easy-to-use platform that helps you build AI applications using small, specialized language models designed for business tasks like question-answering, summarization, and data extraction. It supports private, secure deployment on your own machines without needing expensive GPUs, making it cost-effective and safe for enterprise use. You can organize and search your documents, run smart queries, and combine knowledge with AI to get accurate answers quickly. It also offers many ready-to-use models and examples, plus tools for building chatbots and agents that automate complex workflows. This helps you save time, improve accuracy, and securely leverage AI for your business needs[1][3][5].
https://github.com/llmware-ai/llmware