Skip to content

Instantly share code, notes, and snippets.

@alpham
Created August 23, 2013 16:33
Show Gist options
  • Save alpham/6321350 to your computer and use it in GitHub Desktop.
Save alpham/6321350 to your computer and use it in GitHub Desktop.
this code is written by Ahmed Magdy as an example for a simple application written using Qt/C++ framework.
#include <QApplication>
#include <QLabel>
int main(int argc, char *argv[])
{
QApplication a(argc, argv); // inirialize new instance of QtApplication
QLabel *label = new QLabel("Hello Qt! "); //create new label widget with initial text value "Hello Qt! "
label->setMinimumSize(500,500); // set minimal size for the label ** the label can not be smaller than the specified minimalsize
label->show(); // set the label visible as the default value of visible property is false
return a.exec(); // return the application execution status
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment