I am developing a cross-platform application, and it looks way worse in Windows that in Ubuntu. This has to do only with the default style sheet for Windows vs the one for Ubuntu. Is there a way to obtain the OS-dependent style sheet that is applied to an application? I have tried to retrieve the application style sheet with:
QApplication app(argc, argv);
qDebug() << "Style sheet: " << app.styleSheet();
But this produces an empty string (unless you have manually set it to something). My intention is to retrieve the Ubuntu style sheet and save it to a file (and add it to the resources list), so I can then load it for the application in both OS:
QApplication app(argc, argv);
QFile file(":/ubuntu_style.qss");
file.open(QFile::ReadOnly);
QString styleSheet = QLatin1String(file.readAll());
app.setStyleSheet(styleSheet);
Any ideas on how to get the default style sheet of the OS?