O que há de errado no meu programa?



  • Gostaria de saber o que tem de errado no meu programa:

    @#include <QtGui/QApplication>
    #include <QtGui/QPushButton>
    #include <QtGui/QHBoxLayout>
    #include <QtGui/QLabel>
    int main(int argc,char *argv[]) {
    QApplication prog (argc,argv);
    QWidget janela;
    QHBoxLayout *caixa = new QHBoxLayout(&janela);
    QPushButton *botao = new QPushButton("Sair");
    QLabel *rotulo = new QLabel(argv[1]);
    caixa->addWidget(botao,0,0);
    caixa->addWidget(rotulo,0,1);
    QObject::connect(&botao, SIGNAL(clicked()),
    &prog, SLOT(quit()));
    return prog.exec();
    };
    @

    Desde já, grato.



  • @#include <QtGui/QApplication>
    #include <QtGui/QPushButton>
    #include <QtGui/QHBoxLayout>
    #include <QtGui/QLabel>
    int main(int argc,char *argv[]) {
    QApplication prog (argc,argv);
    QWidget janela;
    QVBoxLayout *caixa = new QVBoxLayout(&janela);
    QPushButton *botao = new QPushButton("Sair");
    QLabel *rotulo = new QLabel("Alô Qt Brazil");
    caixa->addWidget(rotulo,0,Qt::AlignCenter);
    caixa->addWidget(botao,0,0);
    QObject::connect(botao, SIGNAL(clicked()),
    &prog, SLOT(quit()));
    janela.show();
    return prog.exec();
    };
    @


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.