Advertisement
Gustavo_Inzunza

main Qt

Oct 17th, 2013
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.59 KB | None | 0 0
  1. #include "mainwindow.h"
  2. #include "boton.h"
  3. #include <QApplication>
  4. #include <iostream>
  5. #include <QGridLayout>
  6. using namespace std;
  7. int main(int argc, char *argv[])
  8. {
  9.     QApplication a(argc, argv);
  10.     QGridLayout *Malla=new QGridLayout;
  11.     QWidget *ventana=new QWidget;
  12.     boton boton_nuevo[14];
  13.     for(int i=0;i<14;i++)
  14.     {
  15.         if(i<7)
  16.             Malla->addWidget(&boton_nuevo[i],0,i);
  17.         else
  18.             Malla->addWidget(&boton_nuevo[i],1,i-7);
  19.     }
  20.     ventana->setLayout(Malla);
  21.     ventana->resize(500,500);
  22.     ventana->show();
  23.  
  24.     return a.exec();
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement