2016-01-21 121 views
1

在Windows和MacOS中,Qt Creator 5.5在语法上不突出TreeViewTreeView不是语法高亮

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标记红色下划线,就好像没有Qt Creator的确认,但它并编译和运行良好。为什么它没有正确突出语法?

回答

1

我认为这是一个错误,因为所需的模块已正确导入。

可以前行抑制使用//@disable-check M300警告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 
    } 

}