Problem with text characters not showing with msvc relases
Solved
General and Desktop
-
When code below get build with msvc 2015 64 then instead of "████▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬" , is displayed ?????????????????????????????????? , problem does not exist with mingw compiler.
Other regular text like numbers and regular chars is displayed fine.// thread info QString info; info.append(QString::number(TESTER.threadPtrVec.size())+"\n"); for(int e=0; e<TESTER.threadPtrVec.size(); e++){ RUNNER * ptr = TESTER.threadPtrVec[e]; double progress = ptr->L_kaugus/data_size; QString bar; if(progress<0.5){ if(progress<0.05){ bar="▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬"; }else if(progress<0.1){ bar="█▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬"; }else if(progress<0.15){ bar="██▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬"; }else if(progress<0.2){ bar="███▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬"; }else if(progress<0.25){ bar="████▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬"; }else if(progress<0.3){ bar="█████▬▬▬▬▬▬▬▬▬▬▬▬▬▬"; }else if(progress<0.35){ bar="██████▬▬▬▬▬▬▬▬▬▬▬▬▬"; }else if(progress<0.4){ bar="███████▬▬▬▬▬▬▬▬▬▬▬▬"; }else if(progress<0.45){ bar="████████▬▬▬▬▬▬▬▬▬▬▬"; }else if(progress<0.5){ bar="█████████▬▬▬▬▬▬▬▬▬▬"; } }else{ if(progress<0.55){ bar="██████████▬▬▬▬▬▬▬▬▬"; }else if(progress<0.60){ bar="███████████▬▬▬▬▬▬▬▬"; }else if(progress<0.65){ bar="████████████▬▬▬▬▬▬▬"; }else if(progress<0.70){ bar="█████████████▬▬▬▬▬▬"; }else if(progress<0.75){ bar="██████████████▬▬▬▬▬"; }else if(progress<0.80){ bar="███████████████▬▬▬▬"; }else if(progress<0.85){ bar="████████████████▬▬▬"; }else if(progress<0.90){ bar="█████████████████▬▬"; }else if(progress<0.95){ bar="██████████████████▬"; }else if(progress>0.95){ bar="██████████████████▌"; } } // bar=QString::number((int)(progress*100)); double num = ptr->prev_result; QString numQ; if(num>0){ numQ=" "+QString::number(num); }else{ numQ=QString::number(num); } info += bar+" "+numQ +"\n"; } ui->tester_info->setText(info); // tester_info is qlabel
-
Which characters do you use exactly? Unicode?
-
try declaring the string as wide:
bar=QString::fromWCharArray(L"██████████████████▌");
-
@Q139
Since you are using plain strings also make sure you did not save your file in some special encoding.Does the problem also occur when you specifying the unicode values for the characters directly?
-