[Previous] [Next] [Contents]

CHAPTER 4. DEVELOPING APPLICATIONS

 

4.3 HELLO WORLD

MzApplication and MzMainWindow are essential classes to initialize window. Let's review "Hello World" as an example.

#include <qpushbutton.h>
#include <mzapplication.h>
#include <mzmainwindow.h>

int main (int argc, char *argv[])

{
MzApplication a (argc, argv);

MzMainWindow mw;
mw.setCentralWidget (new QPushButton ("Hello World"));

mw.show ();

return a.exec ();
}

You MUST call function setCentralWidget () to use MzMainWindow, however it is not needed if you use View class.


[Previous] [Next] [Contents] MIZI Prizm 2.0.0