wrong characters are shown instead of dots in password QLineEdit
-
@jsulm yes, I have style-sheet for those widgets, but I've tried same sheets for the build where I have no problem
that is the one of them, can it spoil something?
.QLineEdit { min-height: 32px; qtproperty-hsizetype="Maximum"; border-radius: 2px; border-style: solid; border-width: 1px; border-color: rgb(0,0,0,25%); margin-top: 4px; margin-bottom: 4px; } .QLineEdit::focus { border-color: rgb(0,147,196, 85%); } .QLineEdit:hover { border-color: rgb(0,0,0,40%); } .QLineEdit:disabled { border-color: rgb(0,0,0,25%); background-color: rgb(255,255,255, 50%); color: rgb(0,0,0, 50%); }
-
@Paul-Busovikov I would try without this style-sheet to be sure
-
@Paul-Busovikov When you start your app do you see any warnings/errors? You build your app on Debian but execute on Mint: did you deploy it (http://doc.qt.io/qt-5/linux-deployment.html)? Could be that it doesn't find the font and falls back to some other font.
-
@jsulm it does find the font, I saw the differences and features of particular fonts
I deploy it by coping qt libraries (which were used during the compilation in sandbox) and their dependencies and qtplugins and fonts into a path available for app
During the work there are no warnings or errorsCan it be some codec problem? I suppose it is UTF-8 in both cases. How can I check it?
Just printed 10000 characters to see how it looks likeQString s; for ( int i = 1; i < 10000; ++i ) { s.append( QChar(i) ); } ui->textEdit->setText(s);
There are 2 variants
-
@Paul-Busovikov In the second output you can see that much less characters can be properly shown. To me it really looks like a font issue. Internally QString uses UTF-16.
-
@jsulm you are right
QFontDatabase().families().join(" | ")
gave me some clue
The first app returned whole list of families and the second one returned the only one which I deployedQFontDatabase::addApplicationFont( "fontDir/myFont.ttf" );
but I don't understand where both apps are looking for fonts
how can I force the app to look for in /usr/local/fonts not only in my deployed font directory? -
And for what reason qt would not use fontconfig ?
-
I don't figure out why fontconfig don't work
But I have solved this particular issue by adding path to free fonts in QT_QPA_FONTDIR -
@Paul-Busovikov said in wrong characters are shown instead of dots in password QLineEdit:
And for what reason qt would not use fontconfig ?
For example because it was built without fontconfig support. Did you build Qt by yourself?
-
@jsulm Thanks for answer. No, I didn't, but I have a log of building
So, as far as I understood it is the reason
[18:57:36] : [Step 2/2] [exec] Qt Gui: [18:57:36] : [Step 2/2] [exec] FreeType ............................... yes [18:57:36] : [Step 2/2] [exec] Using system FreeType ................ no [18:57:36] : [Step 2/2] [exec] HarfBuzz ............................... yes [18:57:36] : [Step 2/2] [exec] Using system HarfBuzz ................ no [18:57:36] : [Step 2/2] [exec] Fontconfig ............................. no [18:57:36] : [Step 2/2] [exec] Image formats: [18:57:36] : [Step 2/2] [exec] GIF .................................. yes [18:57:36] : [Step 2/2] [exec] ICO .................................. yes [18:57:36] : [Step 2/2] [exec] JPEG ................................. yes [18:57:36] : [Step 2/2] [exec] Using system libjpeg ............... no [18:57:36] : [Step 2/2] [exec] PNG .................................. yes [18:57:36] : [Step 2/2] [exec] Using system libpng ................ no
Also for the people who got similar issue there is the way to change password character by style-sheet
lineedit-password-character: 42;
-
@Paul-Busovikov If you would like to know why fontconfig was built execute configure again with additional -v parameter and check the output. I guess you're missing fontconfig header files (dev package).