Add a label and display : QLabel « Qt « C++






Add a label and display

  

#include <QApplication>
#include <QLabel>

int main(int argc, char *argv[])
{
    QApplication app(argc, argv);
    QLabel *label = new QLabel("Hello Qt!");
    label->show();
    return app.exec();
}

   
    
  








Related examples in the same category

1.Adding image to QLabel
2.Clock label
3.Create a Label and show
4.Set tooltip for QLabel
5.Set QLabel buddy
6.Using HTML with QLabel