Advertisement
Guest User

Untitled

a guest
Apr 23rd, 2014
31
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.50 KB | None | 0 0
  1. #include "mainwindow.h"
  2. #include <QApplication>
  3.  
  4. int main(int argc, char *argv[])
  5. {
  6. QApplication a(argc, argv);
  7. MainWindow w;
  8. w.show();
  9.  
  10. return a.exec();
  11. }
  12.  
  13. #ifndef MAINWINDOW_H
  14. #define MAINWINDOW_H
  15.  
  16. #include <QMainWindow>
  17.  
  18. namespace Ui {
  19. class MainWindow;
  20. }
  21.  
  22. class MainWindow : public QMainWindow
  23. {
  24. Q_OBJECT
  25.  
  26. public:
  27. explicit MainWindow(QWidget *parent = 0);
  28. ~MainWindow();
  29.  
  30. private:
  31. Ui::MainWindow *ui;
  32. };
  33.  
  34. #endif // MAINWINDOW_H
  35.  
  36. #include "mainwindow.h"
  37. #include "ui_mainwindow.h"
  38.  
  39. MainWindow::MainWindow(QWidget *parent) :
  40. QMainWindow(parent),
  41. ui(new Ui::MainWindow)
  42. {
  43. ui->setupUi(this);
  44. }
  45.  
  46. MainWindow::~MainWindow()
  47. {
  48. delete ui;
  49. }
  50.  
  51. QT += core gui
  52.  
  53. greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
  54.  
  55. TARGET = RagnSells3
  56. TEMPLATE = app
  57.  
  58.  
  59. SOURCES += main.cpp
  60. mainwindow.cpp
  61.  
  62. HEADERS += mainwindow.h
  63.  
  64. FORMS += mainwindow.ui
  65.  
  66. <ui version="4.0">
  67. <class>MainWindow</class>
  68. <widget class="QMainWindow" name="MainWindow" >
  69. <property name="geometry" >
  70. <rect>
  71. <x>0</x>
  72. <y>0</y>
  73. <width>400</width>
  74. <height>300</height>
  75. </rect>
  76. </property>
  77. <property name="windowTitle" >
  78. <string>MainWindow</string>
  79. </property>
  80. <widget class="QMenuBar" name="menuBar" />
  81. <widget class="QToolBar" name="mainToolBar" />
  82. <widget class="QWidget" name="centralWidget" />
  83. <widget class="QStatusBar" name="statusBar" />
  84. </widget>
  85. <layoutDefault spacing="6" margin="11" />
  86. <pixmapfunction></pixmapfunction>
  87. <resources/>
  88. <connections/>
  89. </ui>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement