static const char a[]="aaa"; static const char b[]="bbb"; qDebug() << (QLatin1String(a)+QLatin1String(b));
C++ (Qt)#ifndef QT_USE_FAST_OPERATOR_PLUS# ifndef QT_USE_FAST_CONCATENATIONinline const QString operator+(const QString &s1, const QString &s2){ QString t(s1); t += s2; return t; }
const QString operator+ ( const QLatin1String & s1, const QLatin1String & s2 )
QString & QString::operator= ( const QLatin1String & str )QString & QString::operator= ( const char * str )
C++ (Qt)class A{ public : int n; operator const QString() { return QString::number(n); }};.. A c;A d;qDebug()<< (c+d);
qDebug() << typeid(QLatin1String("hello ") + QLatin1String("world")).name();
B(); B(const A &aaa) {m_aaa=aaa;} const B operator+(const B &bbb) const {B b; return b;} B& operator=(const B &rhs) {m_aaa=rhs.m_aaa; return *this;} B& operator=(const A &rhs) {m_aaa=rhs; return *this;}class A{public: A();};