Hello guys,
i want to print the writing direction associated to a given language as a string
Case 1: workings well
This code outputs the direction =1 for language arabic associated to country Egypt
QLocale x(QLocale::Arabic, QLocale::Egypt);
qDebug() << xy << x.textDirection();
Case 2: if GuiLanguage=“Arabic”, code outputs 0 .. where is my mistake?
QString xy= "QLocale::" + GuiLanguage + ", QLocale::Egypt";
QLocale x(qPrintable(xy));
qDebug() << xy << x.textDirection();
↧