#include #include #include #include int main(int argc, char *argv[]) { QApplication::setAttribute(Qt::AA_EnableHighDpiScaling); QApplication::setAttribute(Qt::AA_UseHighDpiPixmaps); QApplication::setHighDpiScaleFactorRoundingPolicy(Qt::HighDpiScaleFactorRoundingPolicy::PassThrough); QApplication a(argc, argv); QDialog* dlg = new QDialog(); dlg->setFixedSize(400, 197); QVBoxLayout* mainLayout = new QVBoxLayout(dlg); QLabel* content = new QLabel(dlg); content->setWordWrap(true); content->setText("test test test test test test test test test test test test test test test test test test test test"); mainLayout->addWidget(content); dlg->show(); return a.exec(); }