Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. International
  3. Portuguese
  4. O que há de errado no meu programa?
Forum Update on Monday, May 27th 2025

O que há de errado no meu programa?

Scheduled Pinned Locked Moved Portuguese
2 Posts 2 Posters 1.6k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    douglasllima
    wrote on last edited by
    #1

    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.

    1 Reply Last reply
    0
    • F Offline
      F Offline
      francomartins
      wrote on last edited by
      #2

      @#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();
      };
      @

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved