Quantcast
Channel: Qt DevNet forums: Qt Quick 1283365070**
Viewing all articles
Browse latest Browse all 4972

Assign C++ object to Text element (implicit conversion to QString)

$
0
0
Hi JKSH, thank’s for your response. I think overloading the assignment operator does not work unless I implement this operator in QString class directly (Bar should be assigned to QString not QString to Bar). Also overloading the “operator=” globally does not work. While this works well for other operators like << operator= seems to be a special case because the compiler tells me that “operator=” had to be a static member: QString & operator=(QString & str, const CTextProxy & rhs) {     str = rhs.value();     return str; } Best regards, Martin

Viewing all articles
Browse latest Browse all 4972

Latest Images

Trending Articles



Latest Images