HelloWorld In Qt

xiaoxiao2021-03-06  67

0.create Hello.cpp // Hello.cpp # include #include

INT Main (int Argc, char * argv []) {QApplication APP (Argc, Argv); QLabel * label = new QLabel ("Hello Qt!", 0); app.setmainwidget (label); label-> show () ; return app.exec ();} 1.qmake -projectwill create hello.pro2.qmake -makefile (? to create platform independent project file use qmake -hello.pro, but failed, why) will create makefile3 make4 run (.. / Hello) ./hello -style = Platinum can specify in that interface style, but XP, Mac must turn off main widget in the corresponding system to turn the entire application, if there is no main widget, then close the window after the window is still Background process

转载请注明原文地址:https://www.9cbs.com/read-88106.html

New Post(0)