Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QtCreator - incorrect error highlighting on TableView {anchors.fill: .....}
Qt 6.11 is out! See what's new in the release blog

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

Scheduled Pinned Locked Moved General and Desktop
1 Posts 1 Posters 682 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    d_miller
    wrote on last edited by
    #1

    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; }
             
            }
        }
    }@
    
    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved