0

when exiting application developed under Qt, I am getting following error:

file:///C:/Qt/5.10.0/mingw53_32/qml/QtQuick/Controls/Private/Control.qml:90:
ReferenceError: parent is not defined

from component defined as simply as this:

import QtQuick 2.8
import QtGraphicalEffects 1.0
import QtQuick.Controls.Styles 1.4
import QtQuick.Extras 1.4

Item {
    id:root

    CircularGauge {
        anchors.centerIn: root
    }
}

If line

anchors.centerIn: root

is removed, then there's no error. I am pretty sure that error is produced whenever CircularGauge somehow references parent, although setting

parent:root

in gauge does not help. Any idea what's causing that?

Mitch
  • 23,716
  • 9
  • 83
  • 122
Piotr Smaroń
  • 446
  • 3
  • 11

2 Answers2

0

Set anchors.centerIn: parent instead if anchors.centerIn: root.

KernelPanic
  • 2,328
  • 7
  • 47
  • 90
0

I was using Desktop Qt 5.10.0 MinGW 32bit. When changed to v5.8, application exits without error and this is enough for me.

Piotr Smaroń
  • 446
  • 3
  • 11