There is a sample code here:
void main(int argc, char **argv) { QApplication app(argc, argv); QPushButton topLevelWidget("Hello World!");