Many C++ classes in Qt use implicit data sharing to maximize resource usage and minimize copying. Implicitly shared classes are both safe and efficient when passed as arguments, because only a pointer to the data is passed around, and the data is copied only if and when a function writes to it, i.e., copy-on-write.
这个时候,QString这个类作为信号槽函数的参数传递,传递的时候只会传递对应QString对象所在的地址指针,而不会去调用QString的拷贝复制函数。在C++中,为了让参数传递的时候不去调用参数的拷贝复制函数一般是加const T &,你们如果去寻找对应的信号声明也可以发现,很多信号声明的时候会加上const T &,避免拷贝函数构造和参数修改。
这里说C++的Const T&只是为了帮助大家理解这个隐式共享的概念,并不是说Qt就是用const T &实现的隐式共享,请谨记。