Widget size and font settings
Qpushbutton quit ("quit ");
Quit. Resize (75, 30 );
Quit. setfont (qfont ("Times", 18, qfont: bold ));
Function qwidget: setgeometry (): Take four parameters: the first two are the X and Y corresponding to the coordinates in the upper left corner of the button, which are relative to the parent widget; the last two parameters are the width and height of the button. The result is a button that extends from the coordinate ().
Qwidget window;
Qpushbutton quit ("quit", & window );
Quit. setgeometry (10, 40,180, 40 );
Function qwidget: setgeometry (): Take four parameters: the first two are the X and Y corresponding to the coordinates in the upper left corner of the button, which are relative to the parent widget; the last two parameters are the width and height of the button. The result is a button that extends from the coordinate ().
Window. Resize (200,120 );