forked from qt-creator/qt-creator
Users should be able to add custom QML import paths for Python/PySide2/PyQt5 projects in Qt Creator in order to get syntax highlighting and code completion for custom QML modules. Fixes: QTCREATORBUG-23679 Change-Id: Iec7c691c4b8709c48a790cd27ac7c6e755967796 Reviewed-by: hjk <hjk@qt.io>
42 lines
1.7 KiB
QML
42 lines
1.7 KiB
QML
/****************************************************************************
|
|
**
|
|
** Copyright (C) 2020 The Qt Company Ltd.
|
|
** Contact: https://www.qt.io/licensing/
|
|
**
|
|
** This file is part of Qt Creator.
|
|
**
|
|
** Commercial License Usage
|
|
** Licensees holding valid commercial Qt licenses may use this file in
|
|
** accordance with the commercial license agreement provided with the
|
|
** Software or, alternatively, in accordance with the terms contained in
|
|
** a written agreement between you and The Qt Company. For licensing terms
|
|
** and conditions see https://www.qt.io/terms-conditions. For further
|
|
** information use the contact form at https://www.qt.io/contact-us.
|
|
**
|
|
** GNU General Public License Usage
|
|
** Alternatively, this file may be used under the terms of the GNU
|
|
** General Public License version 3 as published by the Free Software
|
|
** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
|
|
** included in the packaging of this file. Please review the following
|
|
** information to ensure the GNU General Public License requirements will
|
|
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
|
|
**
|
|
****************************************************************************/
|
|
|
|
import QtQuick 2.12
|
|
import QtQuick.Window 2.12
|
|
import Charts 1.0 as Charts // Qt Creator displays "QML module not found (Charts)."
|
|
// if qmlImportPaths value is missing from pyproject.pyproject file.
|
|
|
|
Window {
|
|
width: 640
|
|
height: 480
|
|
visible: true
|
|
title: qsTr("pyproject")
|
|
|
|
Charts.ChartBackground { // Syntax highlight and code completion doesn't work
|
|
// if qmlImportPaths value is missing from pyproject.pyproject file.
|
|
anchors.centerIn: parent
|
|
}
|
|
}
|