Skip to content

Instantly share code, notes, and snippets.

@FONQRI
Created July 17, 2019 19:49
Show Gist options
  • Save FONQRI/b32fed984ff91afde3b4c628569e2a83 to your computer and use it in GitHub Desktop.
Save FONQRI/b32fed984ff91afde3b4c628569e2a83 to your computer and use it in GitHub Desktop.
how to set tem for qt widgets
#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