[solved] how to set local fonts
-
What does this output ?
@
QFontDatabase d;
foreach(QString fmly, d.families(QFontDatabase::Tamil))
{
qDebug() << fmly;
}
@ -
@QFontDatabase d;
foreach(QString fmly, d.families(QFontDatabase::Tamil))
{
qDebug("சென்னை") << fmly;
ui->label1->show();
}@error:--
/home/dev6/Desktop/animation-build-desktop-Qt_4_8_1_in_PATH__System__Release/../animation/dialog.cpp:43: error: no match for 'operator<<' in 'qDebug(((const char*)"\37777777740\37777777656\37777777632\37777777740\37777777657\37777777606\37777777740\37777777656\37777777651\37777777740\37777777657\37777777615\37777777740\37777777656\37777777651\37777777740\37777777657\37777777610")) << fmly'-[quote author="p3c0" date="1411714136"]What does this output ?
@
QFontDatabase d;
foreach(QString fmly, d.families(QFontDatabase::Tamil))
{
qDebug() << fmly;
}
@[/quote] -
No.. Just use as it is as shown earlier. It will just print a list of fonts available under Tamil Writingsystem.
-
@QFontDatabase label1;
foreach(QString fmly, label1.families(QFontDatabase::Tamil))
{
//qDebug("சென்னை") << fmly;
qDebug("சென்னை");
ui->label1->show();
}@no output. getting blank.
bq. bq. bq. Application output:
Starting /home/dev6/Desktop/animation-build-desktop-Qt_4_8_1_in_PATH__System__Release/animation...
à®à¯à®©à¯à®©à¯
à®à¯à®©à¯à®©à¯
à®à¯à®©à¯à®©à¯
à®à¯à®©à¯à®©à¯
à®à¯à®©à¯à®©à¯
à®à¯à®©à¯à®©à¯
à®à¯à®©à¯à®©à¯
à®à¯à®©à¯à®©à¯ bq.[quote author="p3c0" date="1411714136"]What does this output ?
@
QFontDatabase d;
foreach(QString fmly, d.families(QFontDatabase::Tamil))
{
qDebug() << fmly;
}
@[/quote] -
bq. 3 errors:
/home/dev6/Desktop/animation-build-desktop-Qt_4_8_1_in_PATH__System__Release/../animation/dialog.cpp:43: error: invalid use of incomplete type 'struct QDebug'
/usr/include/qt4/QtCore/qglobal.h:1764: error: forward declaration of 'struct QDebug'
/usr/include/qt4/QtCore/qglobal.h:1767: warning: inline function 'QDebug qDebug()' used but never defined [enabled by default]
[quote author="p3c0" date="1411717583"]No.. Just use as it is as shown earlier. It will just print a list of fonts available under Tamil Writingsystem.[/quote]
-
#include <QDebug>
-
Starting /home/dev6/Desktop/animation-build-desktop-Qt_4_8_1_in_PATH__System__Release/animation...
"Lohit Tamil"
"TAMu_Kadambri"
"TAMu_Kalyani"
"TAMu_Maduram"
"TSCu_Comic"
"TSCu_Paranar [macromedia]"
"TSCu_Paranar [unknown]"
"TSCu_Times"
/home/dev6/Desktop/animation-build-desktop-Qt_4_8_1_in_PATH__System__Release/animation exited with code 0[quote author="p3c0" date="1411718354"]#include <QDebug>[/quote]
-
Try this:
@
ui->label->setText(QString::fromUtf8("சென்னை"));
@ -
That's fine :)
Please mark the post as solved.
Happy Coding... -
I'm not a developer. I'm using Telegram app for instant messaging. I believe it uses Qt interface. In Debian, we have something called 'qt5ct' through which we can change Qt interface settings. When I change the font in qt5ct, it gets reflected in KDE applications like Kate editor. But not in Telegram. Telegram is also installed using the apt package manager, not the AppImage one.