diff options
-rw-r--r-- | src/qt-test.cpp | 15 | ||||
-rw-r--r-- | src/qt-test.pro | 6 | ||||
-rw-r--r-- | src/qt-test.ui | 107 | ||||
-rw-r--r-- | src/qt.mk | 20 |
4 files changed, 141 insertions, 7 deletions
diff --git a/src/qt-test.cpp b/src/qt-test.cpp new file mode 100644 index 0000000..706082d --- /dev/null +++ b/src/qt-test.cpp @@ -0,0 +1,15 @@ +/* This file is part of mingw-cross-env. */ +/* See doc/index.html or doc/README for further information. */ + +#include <QtGui/QApplication> +#include "ui_qt-test.h" + +int main(int argc, char *argv[]) +{ + QApplication a(argc, argv); + QMainWindow w; + Ui::MainWindow u; + u.setupUi(&w); + w.show(); + return a.exec(); +} diff --git a/src/qt-test.pro b/src/qt-test.pro new file mode 100644 index 0000000..85d1109 --- /dev/null +++ b/src/qt-test.pro @@ -0,0 +1,6 @@ +# This file is part of mingw-cross-env. +# See doc/index.html or doc/README for further information. + +TARGET = test-qt +SOURCES += qt-test.cpp +FORMS += qt-test.ui diff --git a/src/qt-test.ui b/src/qt-test.ui new file mode 100644 index 0000000..4515072 --- /dev/null +++ b/src/qt-test.ui @@ -0,0 +1,107 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<!-- This file is part of mingw-cross-env. --> +<!-- See doc/index.html or doc/README for further information. --> + +<ui version="4.0"> + <class>MainWindow</class> + <widget class="QMainWindow" name="MainWindow"> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>400</width> + <height>300</height> + </rect> + </property> + <property name="windowTitle"> + <string>test-qt</string> + </property> + <widget class="QWidget" name="centralwidget"> + <layout class="QHBoxLayout" name="horizontalLayout"> + <item> + <widget class="QTextBrowser" name="textBrowser"> + <property name="html"> + <string> + <![CDATA[ + <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> + <html> + <head> + <meta http-equiv="content-type" content="text/html; charset=utf-8"> + <title>test-qt</title> + <style type="text/css"> + body { + font-family: sans-serif; + } + h1 { + font-size: 14pt; + margin-top: 0em; + text-align: center; + background-color: #afa; + } + </style> + </head> + <body> + <h1>test-qt</h1> + <p>test-qt</p> + <ol> + <li>test-qt</li> + <li>test-qt</li> + <li><em>test-qt</em></li> + </ol> + </body> + </html> + ]]> + </string> + </property> + </widget> + </item> + </layout> + </widget> + <widget class="QMenuBar" name="menubar"> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>400</width> + <height>26</height> + </rect> + </property> + <widget class="QMenu" name="menuFile"> + <property name="title"> + <string>&File</string> + </property> + <addaction name="actionQuit"/> + </widget> + <addaction name="menuFile"/> + </widget> + <widget class="QStatusBar" name="statusbar"/> + <action name="actionQuit"> + <property name="text"> + <string>&Quit</string> + </property> + <property name="shortcut"> + <string>Ctrl+Q</string> + </property> + </action> + </widget> + <resources/> + <connections> + <connection> + <sender>actionQuit</sender> + <signal>triggered()</signal> + <receiver>MainWindow</receiver> + <slot>close()</slot> + <hints> + <hint type="sourcelabel"> + <x>-1</x> + <y>-1</y> + </hint> + <hint type="destinationlabel"> + <x>399</x> + <y>299</y> + </hint> + </hints> + </connection> + </connections> +</ui> @@ -42,15 +42,15 @@ define $(PKG)_BUILD -nomake docs \ -nomake translations - $(MAKE) -C '$(1)'.native -j $(JOBS) sub-tools-bootstrap - $(MAKE) -C '$(1)'.native -j $(JOBS) sub-moc - $(MAKE) -C '$(1)'.native -j $(JOBS) sub-rcc - $(MAKE) -C '$(1)'.native -j $(JOBS) sub-uic + $(MAKE) -C '$(1)'.native -j '$(JOBS)' sub-tools-bootstrap + $(MAKE) -C '$(1)'.native -j '$(JOBS)' sub-moc + $(MAKE) -C '$(1)'.native -j '$(JOBS)' sub-rcc + $(MAKE) -C '$(1)'.native -j '$(JOBS)' sub-uic # rebuild qmake to use "-unix" as default and to use the correct "ar" command $(SED) 's,\(Option::TARG_MODE Option::target_mode = Option::TARG_\)[A-Z_]*,\1UNIX_MODE,' -i '$(1)'.native/qmake/option.cpp $(SED) 's,"ar -M,"$(TARGET)-ar -M,' -i '$(1)'.native/qmake/generators/win32/mingw_make.cpp - $(MAKE) -C '$(1)'.native/qmake -j $(JOBS) + $(MAKE) -C '$(1)'.native/qmake -j '$(JOBS)' # install the native tools manually $(INSTALL) -m755 '$(1)'.native/bin/moc '$(PREFIX)/bin/$(TARGET)-moc' @@ -132,7 +132,13 @@ define $(PKG)_BUILD -v $(MAKE) -C '$(1)' -j '$(JOBS)' - $(TARGET)-ranlib '$(1)'/lib/*.a + '$(TARGET)-ranlib' '$(1)'/lib/*.a rm -rf '$(PREFIX)/$(TARGET)/mkspecs' - $(MAKE) -C '$(1)' install + $(MAKE) -C '$(1)' -j 1 install + + mkdir '$(1)/test-qt' + cp '$(2)'* '$(1)/test-qt/' + cd '$(1)/test-qt' && '$(TARGET)-qmake' + $(MAKE) -C '$(1)/test-qt' -j '$(JOBS)' + $(INSTALL) -m755 '$(1)/test-qt/release/test-qt.exe' '$(PREFIX)/$(TARGET)/bin/' endef |