1. How do I know the installation path of QT?
Qlibraryinfo: location. You can query the paths of different QT modules based on parameters, such as the paths of translations and Doc.
2. qdir: fromnativeseparators/qdir: tonativeseparators
These two static methods are ineffective in Unix/Linux. Manually process the path Separator in the path and use the method provided by qstring.
3. qstring cannot be used in STD: cout/STD: cin.
Because the qstring overload <symbol definition is soy sauce purple: qdatastream & operator <(qdatastream & stream, const qstring & string)
Therefore, use the tostdstring of qstring for conversion, such as STD: cout <test_qstring.tostdstring () <STD: Endl;
C ++ <operator heavy load is to look at the type on the left, for example, the cout here is the ostream type, this class will provide a series of operator
Therefore, in this example, ostream cannot handle qstring. In addition, although operator <is overloaded, qstring is used to support qdatastream. Therefore, qstring cannot be used in ostream.