Does Q_UNUSED have any side effects?

No in many cases (e.g. just passing a simple variable to the macro). The definition is inside qglobal.h: # define Q_UNUSED(x) (void)x; To disable unused variable warnings. You can use the variable after this macro without any problem. However, if you pass an expression or something else to the macro and the compiler has to … Read more

Qt: *.pro vs *.pri

There is one main difference between their targetted reuse: .pro This is usually called Project File. .pri This is usually called Project Include File. As you can see in their names, the main difference is that .pri files are meant to be include files. That is similar to including modules in programming language to share … Read more

QString to char* conversion

Well, the Qt FAQ says: int main(int argc, char **argv) { QApplication app(argc, argv); QString str1 = “Test”; QByteArray ba = str1.toLocal8Bit(); const char *c_str2 = ba.data(); printf(“str2: %s”, c_str2); return app.exec(); } So perhaps you’re having other problems. How exactly doesn’t this work?

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)