vscode-qt-for-python
vscode-qt-for-python copied to clipboard
`.qmllint.ini` not working
Describe the Bug
It seems it doesn't respect .qmllint.ini
file
To Reproduce Steps to reproduce the behavior:
- Install it
- create
.qmllint.ini
- not working! 😑
Expected Behavior Not showing warnings and errors
Screenshots
Environment
- OS:
Ubuntu 24.04 LTS
- Visual Studio Code version:
1.91.1
- PySide version:
6.7.2
- Python version:
3.12.3
Extension Configurations Nothing Additional context
This is my project structure (Controller
directory was made after running pyside6-project run
)
.
├── app
│ ├── accounting.pyproject
│ ├── assets
│ │ ├── fonts
│ │ │ ├── fontawesome
│ │ │ │ ├── FontAwesome-Brands.otf
│ │ │ │ ├── FontAwesome-Regular.otf
│ │ │ │ └── FontAwesome-Solid.otf
│ │ │ ├── material
│ │ │ │ ├── MaterialSymbolsOutlined.ttf
│ │ │ │ ├── MaterialSymbolsRounded.ttf
│ │ │ │ └── MaterialSymbolsSharp.ttf
│ │ │ └── vazirmatn
│ │ │ ├── Vazirmatn-UI-FD-NL-Black.ttf
│ │ │ ├── Vazirmatn-UI-FD-NL-Bold.ttf
│ │ │ ├── Vazirmatn-UI-FD-NL-ExtraBold.ttf
│ │ │ ├── Vazirmatn-UI-FD-NL-ExtraLight.ttf
│ │ │ ├── Vazirmatn-UI-FD-NL-Light.ttf
│ │ │ ├── Vazirmatn-UI-FD-NL-Medium.ttf
│ │ │ ├── Vazirmatn-UI-FD-NL-Regular.ttf
│ │ │ ├── Vazirmatn-UI-FD-NL-SemiBold.ttf
│ │ │ └── Vazirmatn-UI-FD-NL-Thin.ttf
│ │ └── imgs
│ │ ├── icon.ico
│ │ └── icon.png
│ ├── controlers
│ │ ├── __init__.py
│ │ └── LabeledIconButton.py
│ ├── Controllers
│ │ └── LabeledIconButton
│ │ ├── LabeledIconButtonmetatypes.json
│ │ ├── LabeledIconButton_qmltyperegistrations.cpp
│ │ ├── LabeledIconButton.qmltypes
│ │ └── qmldir
│ ├── main.py
│ ├── qml
│ │ ├── components
│ │ │ ├── Card.qml
│ │ │ └── LabeledIconButton.qml
│ │ ├── main.qml
│ │ └── sections
│ │ └── Header.qml
│ ├── qtquickcontrols2.conf
│ ├── resource.qrc
│ ├── resource_rc.py
│ └── utils
│ ├── __init__.py
│ ├── settings.py
│ └── shortcuts.py
├── LICENCE
├── README.md
└── requirements.txt
15 directories, 38 files
This is my .qmllint.ini
file:
[General]
DisableDefaultImports=false
OverwriteImportTypes=
ResourcePath=app/resource.qrc
AdditionalQmlImportPaths=app/Controllers/
AdditionalQmlImportPaths=app/Controllers/LabeledIconButton
[Warnings]
BadSignalHandler=warning
TypeError=warning
UnknownProperty=warning
ImportFailure=warning
ReadOnlyProperty=warning
BadSignalHandlerParameters=warning
UnusedImports=warning
DuplicatedName=warning
PrefixedImportType=warning
AccessSingletonViaObject=warning
Deprecated=warning
ControlsSanity=warning
UnresolvedType=warning
LintPluginWarnings=warning
MultilineStrings=warning
RestrictedType=warning
PropertyAliasCycles=warning
VarUsedBeforeDeclaration=warning
AttachedPropertyReuse=warning
RequiredProperty=warning
WithStatement=warning
InheritanceCycle=warning
UnqualifiedAccess=warning
UncreatableType=warning
MissingProperty=warning
InvalidLintDirective=warning
CompilerWarnings=warning
UseProperFunction=warning
NonListProperty=warninig
IncompatibleType=warning
TopLevelComponent=warning
MissingType=warning
DuplicatePropertyBinding=warning
My LabeledIconButton.py
is defined as:
# app/controlers/LabeledIconButton.py
from PySide6.QtCore import QObject, Slot
from PySide6.QtQml import QmlElement
QML_IMPORT_NAME = "Controllers.LabeledIconButton"
QML_IMPORT_MAJOR_VERSION = 1
@QmlElement
class LabeledIconButton(QObject):
@Slot(int, result=bool)
def changeScreen(self, idx: int) -> bool:
print("python: ", idx)
return True
and registerd using
# app/controlers/__init__.py
from controlers.LabeledIconButton import LabeledIconButton
from PySide6.QtQml import QQmlApplicationEngine
__all__ = [
'LabeledIconButton',
'register_controllers'
]
def register_controllers(engine: QQmlApplicationEngine) -> None:
controller = LabeledIconButton()
context = engine.rootContext()
context.setContextProperty("controller", controller)
There is no problem when I run or compile codes but I don't know how to get rid of this warning it's really annoying