逛奔的蜗牛

我不聪明,但我会很努力

   ::  :: 新随笔 ::  ::  :: 管理 ::

#include <QtGui/QApplication>

#include <QtGui/QLabel>

#include <QtGui/QWidget>

#include <QtGui/QHBoxLayout>


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

    QApplication a(argc, argv);

    QWidget hello;

    QLabel hello1("Hello1 World",&hello);

    QHBoxLayout layout;

    layout.addWidget(&hello1);

    hello.show();


    QLabel hello2("\n\n\t\t\tHello2 Wrold", &hello); // 但实际上在父Widget的(0, 0)处定位显示了.

    hello2.show();


    return a.exec();

}

posted on 2009-05-25 12:03 逛奔的蜗牛 阅读(997) 评论(0)  编辑 收藏 引用 所属分类: Qt

只有注册用户登录后才能发表评论。
网站导航: 博客园   IT新闻   BlogJava   知识库   博问   管理