Created
October 4, 2016 20:02
-
-
Save brcontainer/38aa64dc161ef768dfeaca8a40682998 to your computer and use it in GitHub Desktop.
QT example for Wallace
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "wallacewindow.h" | |
#include <QApplication> | |
int main(int argc, char *argv[]) | |
{ | |
QApplication a(argc, argv); | |
WallaceWindow w; | |
w.show(); | |
return a.exec(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
QT += core gui | |
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets | |
TARGET = wallace | |
TEMPLATE = app | |
SOURCES += main.cpp\ | |
wallacewindow.cpp | |
HEADERS += wallacewindow.h | |
FORMS += wallacewindow.ui |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "wallacewindow.h" | |
#include "ui_wallacewindow.h" | |
/* | |
ui_wallacewindow.h é gerado automaticamente | |
*/ | |
WallaceWindow::WallaceWindow(QWidget *parent) : | |
QMainWindow(parent), | |
ui(new Ui::WallaceWindow) | |
{ | |
ui->setupUi(this); | |
} | |
WallaceWindow::~WallaceWindow() | |
{ | |
delete ui; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef WALLACEWINDOW_H | |
#define WALLACEWINDOW_H | |
#include <QMainWindow> | |
namespace Ui { | |
class WallaceWindow; | |
} | |
class WallaceWindow : public QMainWindow | |
{ | |
Q_OBJECT | |
public: | |
explicit WallaceWindow(QWidget *parent = 0); | |
~WallaceWindow(); | |
private: | |
Ui::WallaceWindow *ui; | |
}; | |
#endif // WALLACEWINDOW_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<ui version="4.0"> | |
<class>WallaceWindow</class> | |
<widget class="QMainWindow" name="WallaceWindow"> | |
<property name="geometry"> | |
<rect> | |
<x>0</x> | |
<y>0</y> | |
<width>400</width> | |
<height>300</height> | |
</rect> | |
</property> | |
<property name="windowTitle"> | |
<string>MainWindow</string> | |
</property> | |
<widget class="QWidget" name="centralWidget"> | |
<widget class="QPushButton" name="pushButton"> | |
<property name="geometry"> | |
<rect> | |
<x>140</x> | |
<y>120</y> | |
<width>75</width> | |
<height>23</height> | |
</rect> | |
</property> | |
<property name="text"> | |
<string>PushButton</string> | |
</property> | |
</widget> | |
</widget> | |
</widget> | |
<layoutdefault spacing="6" margin="11"/> | |
<resources/> | |
<connections/> | |
</ui> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment