Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Dot symbol in "type" field of property definition operator

I am using Qt 5.2 and QtQuick 2.2. In my project I have several modules that are placed in separated directories. My problem is that I can't use dot-separator in typename while defining properties. For example:

MyRect.qml

import QtQuick 2.2

Rectangle {
   id: root
   property color rectColor: "white"

   color: root.rectColor 
}

MyRectInRect.qml

import QtQuick 2.2
import "./" as MyModule

Rectangle {
   id: root

   property MyModule.MyRect innerRect: MyModule.MyRect {  } 
   // ^ error: Unexpected token `.'; Unexpected token `identifier'
}

I have searched for something that could explain this behavior in the manual, but looks like there is nothing about it there. I guess that dot symbol is not allowed to be used in "type" field of property definition. But is there any way to explicitly define, what component from which module should be used as a type? Cause there may be need of declaring properties with same typenames, but from different modules.

like image 487
Leonid.cpp Avatar asked Nov 11 '22 08:11

Leonid.cpp


1 Answers

This is a known issue: QTBUG-10822

like image 51
Mitch Avatar answered Nov 15 '22 12:11

Mitch