How to integrate qmllint with PySide6 development?



  • I am trying to use qmllint to help me to find hard-to-debug issues in QML, but I'm having two issues with it.

    1. It doesn't seem to recognize some of QML's built-in types like ProgressBar and MessageDialog (I hope this should be easy to solve?):
    Warning: myqmlapp.qml: NativeStyle.DefaultProgressBar was not found. Did you add all import paths?
    Warning: myqmlapp.qml: MessageDialog was not found. Did you add all import paths?
    
    1. It cannot recognize elements declared within the Python source. For example, in my code, I have two new types declared with @QmlElement, resulting in several errors:
    Warning: myqmlapp.qml:7:1: Warnings occurred while importing module "myqmlapp/mainwindow":
    import myqmlapp.mainwindow 1.0
    ---
    Warning: Failed to import myqmlapp/mainwindow. Are your include paths set up properly?
    ---
    Warning: myqmlapp.qml: BridgeMainWindow was not found. Did you add all import paths?
    Warning: myqmlapp.qml: WorkerSignals was not found. Did you add all import paths?
    

    I believe this second issue should be harder to solve? Is it possible to extract the type information from the Python source (ideal solution), or at least teach qmllint to ignore those types?



  • you cannot, that's why it's being worked out https://bugreports.qt.io/browse/PYSIDE-1709



  • @CristianMaureira said in How to integrate qmllint with PySide6 development?:

    PYSIDE-1709

    Curiously, I cannot see the bug on Jira: it says "You can't view this issue: It may have been deleted or you don't have permission to view it".


Log in to reply