QtCreator - incorrect error highlighting on TableView {anchors.fill: .....}



  • I'm developing a desktop app using Qt Creator. In the QML shown below, the 'anchors.fill' in TableView highlights as an error. It still builds and runs correctly, any idea as to why this is happening? I know that TableView inherits anchors.fill from Item as per the documentation, so it shouldn't show as an error.

    Thanks!

    @import QtQuick.Controls 1.1
    import QtQuick.Layouts 1.1
    import QtQuick.Dialogs 1.1
    import QtQuick 2.1
    import PartyTime 1.0

    Rectangle {
        id: mainWindow
        width: 0.7 * parent.width
        anchors { top: menubar.bottom; bottom: errorConsole.top; left: treeWindow.right }
        border.width: 1
        border.color: "dark grey"
    
        Rectangle {
            id: traceTitleBar
            width: parent.width
            height: 20
            color: "grey"
    
            Text {
                anchors.left: parent.left
                text: "System Trace"
            }
        }
    
        PartyTime {
            id: ptimeMessage1
            width: parent.width
            height: parent.height - traceTitleBar.height
            anchors.top: traceTitleBar.bottom
    
            TableView {
                anchors.fill: parent  //*   <-- anchors is error highlighted here*
                id: traceTable
    
                TableViewColumn{ title: "Index";  width: 0.25 * mainWindow.width; }
                TableViewColumn{ title: "Type"; width: 0.25 * mainWindow.width; }
                TableViewColumn{ title: "ID"; width: 0.25 * mainWindow.width; }
                TableViewColumn{ title: "Timestamp"; width: 0.25 * mainWindow.width; }
             
            }
        }
    }@

Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.