problem with font after deploys
-
Hi and welcome to devnet,
Did you forget to deploy your font with your application ?
-
@SGaist said in problem with font after deploys:
y your
deploy my font__???? i dont know how to do that, can you explain me_?
-
First thing: where does the font you use come from ?
-
i rightclicked the labels, - styleSheets, - addfont, from there i select the font, so the font may come from the window's system folder
-
Are you sure it's a system font ?
What name is it ? -
is not a default system font, i download the font , and paste in the font system folder, the name of the font is Usuziv2, i use it in my application, then i deploy it, and when i run my app in another pc tha application load another font, thats my problem
-
You have to distribute that font alongside your application but you must first check that it's allowed by the font author.
As for the distribution, you can use Qt's resources system.
-
You have to distribute that font alongside your application but you must first check that it's allowed by the font author.
As for the distribution, you can use Qt's resources system.
@SGaist
now i added the font to a resource file that i create, but dont know how to set te font from the resource file to the label -
QFontDatabase is the best place to handle fonts.
-
QFontDatabase is the best place to handle fonts.
@SGaist said in problem with font after deploys:
e best place to h
solved
first add the font to the .qrc file, and then this line>
QFontDatabase::addApplicationFont(“:/fonts/fontName.ttf”);
and the labels with font: xpx, "fontName";thanks
-
You're welcome !
Since you have it working now, please mark the thread as solved using the "Topic Tools" button so that other forum users may know a solution has been found :)