Created
July 17, 2019 19:49
-
-
Save FONQRI/b32fed984ff91afde3b4c628569e2a83 to your computer and use it in GitHub Desktop.
how to set tem for qt widgets
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <QtWidgets> | |
#include "addressbook.h" | |
int main(int argc, char *argv[]) | |
{ | |
QApplication app(argc, argv); | |
AddressBook addressBook; | |
addressBook.show(); | |
// Load an application style | |
QFile styleFile( ":/style.qss" ); | |
styleFile.open( QFile::ReadOnly ); | |
// Apply the loaded stylesheet | |
QString style( styleFile.readAll() ); | |
app.setStyleSheet( style ); | |
return app.exec(); | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment