[Previous: Widgets Tutorial] [Contents] [Next: Widgets Tutorial - Child Widgets] Widgets Tutorial - Creating a Window
|
#include <QtGui> int main(int argc, char *argv[]) { QApplication app(argc, argv); QWidget window; window.resize(320, 240); window.show(); window.setWindowTitle( QApplication::translate("toplevel", "Top-level widget")); return app.exec(); } |
To create a real GUI, we need to place widgets inside the window. To do this, we pass a QWidget instance to a widget's constructor, as we will demonstrate in the next part of this tutorial.
[Previous: Widgets Tutorial] [Contents] [Next: Widgets Tutorial - Child Widgets]
Copyright © 2009 Nokia Corporation and/or its subsidiary(-ies) | Trademarks | Qt 4.6.0 |
Попытка перевода Qt документации. Если есть желание присоединиться, или если есть замечания или пожелания, то заходите на форум: Перевод Qt документации на русский язык... Люди внесшие вклад в перевод: Команда переводчиков |