#include #include #include #include using namespace Qt::Literals; int main(int argc, char **argv) { QApplication app(argc, argv); QWidget root; QVBoxLayout layout(&root); QLabel lbl(u"This is some dummy text"_s); QLabel lbl2(u"This is some dummy text"_s); auto font = lbl2.font(); font.setHintingPreference(QFont::PreferVerticalHinting); lbl2.setFont(font); layout.addWidget(&lbl); layout.addWidget(&lbl2); root.show(); return app.exec(); }