Int main (INT argc, char * argv [])
{
Qapplication app (argc, argv );
// Qlabel lbinfo ("Hello, world", 0 );
Qlabel * lbinfo = new qlabel ("Hello, world", 0 );
// Lbinfo. Show ();
Lbinfo-> show ();
Return app.exe C ();
}
2,
# Include <qapplication>
# Include <qpushbutton>
Int main (INT argc, char * argv [])
{
Qapplication app (argc, argv );
// Qpushbutton btnok ("OK", 0 );
Qpushbutton * btnok = new qpushbutton ("OK", 0 );
Btnok-> resize (300,200 );
Qobject: connect (btnok, signal (clicked (), & App, slot (quit (); // connect the signal to the slot.
Btnok-> show ();
Return app.exe C ();
}
3,
# Include <qapplication>
# Include <qwidget>
# Include <qslider>
# Include <qspinbox. h>
Int main (INT argc, char * argv [])
{
Qapplication app (argc, argv );
Qobject: connect (spbox, signal (valuechanged (INT), Slider, slot (setvalue (INT); // connect the signal to the slot.
Qobject: connect (slider, signal (valuechanged (INT), spbox, slot (setvalue (INT); // connect the signal to the slot.
Spbox-> setvalue (32 );
Centralwidget-> show ();
Return app.exe C ();
}
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service