2013-04-19 14:26:54 +08:00
|
|
|
/**
|
2015-01-27 17:14:37 +08:00
|
|
|
* MIT Licensed
|
|
|
|
*
|
|
|
|
* Copyright 2011-2015 - Reliable Bits Software by Blommers IT. All Rights Reserved.
|
2013-04-19 14:26:54 +08:00
|
|
|
* Author Rick Blommers
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "QtAwesome.h"
|
|
|
|
|
|
|
|
#include <QApplication>
|
|
|
|
#include <QMainWindow>
|
|
|
|
#include <QPushButton>
|
|
|
|
|
|
|
|
int main(int argc, char *argv[])
|
|
|
|
{
|
|
|
|
QApplication app(argc, argv);
|
|
|
|
QMainWindow w;
|
|
|
|
|
|
|
|
QtAwesome* awesome = new QtAwesome(&w);
|
|
|
|
awesome->initFontAwesome();
|
|
|
|
|
|
|
|
// a simple beer button
|
2015-12-08 14:06:46 +08:00
|
|
|
QPushButton* beerButton = new QPushButton( "Cheers!");
|
|
|
|
|
|
|
|
|
|
|
|
QVariantMap options;
|
|
|
|
options.insert("anim", qVariantFromValue( new QtAwesomeAnimation(beerButton) ) );
|
|
|
|
beerButton->setIcon( awesome->icon( fa::beer, options ) );
|
|
|
|
|
2013-04-19 14:26:54 +08:00
|
|
|
w.setCentralWidget( beerButton );
|
|
|
|
w.show();
|
|
|
|
|
|
|
|
return app.exec();
|
|
|
|
}
|