Permalink
Browse files

Criado de novo :D

  • Loading branch information...
1 parent 58a254f commit 8bc02c25496090232eae4bd53c90edd78b5ab75e @gabrielgarciagava committed Apr 24, 2012
Showing with 99 additions and 0 deletions.
  1. +26 −0 Mainwindow.cpp
  2. +23 −0 Mainwindow.h
  3. +24 −0 Mainwindow.ui
  4. +16 −0 ProjetoFormais1.pro
  5. +10 −0 main.cpp
View
@@ -0,0 +1,26 @@
+#include "Mainwindow.h"
+#include "ui_Mainwindow.h"
+
+MainWindow::MainWindow(QWidget *parent) :
+ QMainWindow(parent),
+ ui(new Ui::MainWindow)
+{
+ ui->setupUi(this);
+}
+
+MainWindow::~MainWindow()
+{
+ delete ui;
+}
+
+void MainWindow::changeEvent(QEvent *e)
+{
+ QMainWindow::changeEvent(e);
+ switch (e->type()) {
+ case QEvent::LanguageChange:
+ ui->retranslateUi(this);
+ break;
+ default:
+ break;
+ }
+}
View
@@ -0,0 +1,23 @@
+#ifndef MAINWINDOW_H
+#define MAINWINDOW_H
+
+#include <QMainWindow>
+
+namespace Ui {
+ class MainWindow;
+}
+
+class MainWindow : public QMainWindow {
+ Q_OBJECT
+public:
+ MainWindow(QWidget *parent = 0);
+ ~MainWindow();
+
+protected:
+ void changeEvent(QEvent *e);
+
+private:
+ Ui::MainWindow *ui;
+};
+
+#endif // MAINWINDOW_H
View
@@ -0,0 +1,24 @@
+<ui version="4.0">
+ <class>MainWindow</class>
+ <widget class="QMainWindow" name="MainWindow" >
+ <property name="geometry" >
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>600</width>
+ <height>400</height>
+ </rect>
+ </property>
+ <property name="windowTitle" >
+ <string>MainWindow</string>
+ </property>
+ <widget class="QMenuBar" name="menuBar" />
+ <widget class="QToolBar" name="mainToolBar" />
+ <widget class="QWidget" name="centralWidget" />
+ <widget class="QStatusBar" name="statusBar" />
+ </widget>
+ <layoutDefault spacing="6" margin="11" />
+ <pixmapfunction></pixmapfunction>
+ <resources/>
+ <connections/>
+</ui>
View
@@ -0,0 +1,16 @@
+#-------------------------------------------------
+#
+# Project created by QtCreator 2012-04-24T20:07:06
+#
+#-------------------------------------------------
+
+TARGET = ProjetoFormais1
+TEMPLATE = app
+
+
+SOURCES += main.cpp\
+ Mainwindow.cpp
+
+HEADERS += Mainwindow.h
+
+FORMS += Mainwindow.ui
View
@@ -0,0 +1,10 @@
+#include <QtGui/QApplication>
+#include "Mainwindow.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication a(argc, argv);
+ MainWindow w;
+ w.show();
+ return a.exec();
+}

0 comments on commit 8bc02c2

Please sign in to comment.