zar
zar

Reputation: 12237

TreeView is not syntax highlighted

Qt Creator 5.5 doesn't syntax highlight TreeView both in Windows and MacOS.

import QtQuick 2.5
import QtQuick.Window 2.2
import QtQuick.Controls 1.4

ApplicationWindow {
    visible: true
    width: Screen.width /2
    height: Screen.height/2

    TreeView {
        anchors.fill: parent
    }

}

TreeView is marked red underlined as if not recognized by Qt Creator but it does compile and run fine. Why is it not syntax highlighted properly?

Upvotes: 1

Views: 176

Answers (1)

Tarod
Tarod

Reputation: 7170

I think it's a bug, because the required modules are properly imported.

You can suppress the warning using //@disable-check M300 before the line TreeView {

import QtQuick 2.5
import QtQuick.Window 2.2
import QtQuick.Controls 1.4

ApplicationWindow {
    visible: true
    width: Screen.width /2
    height: Screen.height/2

    //@disable-check M300
    TreeView {
        anchors.fill: parent
    }

}

Upvotes: 1

Related Questions