Mercurial > mxe-octave
changeset 660:f77810598227
test program for package qt
author | Volker Grabsch <vog@notjusthosting.com> |
---|---|
date | Sat, 23 Jan 2010 00:07:21 +0100 |
parents | c96eeb56f5de |
children | 0238a7b6bca2 |
files | src/qt-test.cpp src/qt-test.pro src/qt-test.ui src/qt.mk |
diffstat | 4 files changed, 134 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/qt-test.cpp Sat Jan 23 00:07:21 2010 +0100 @@ -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(); +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/qt-test.pro Sat Jan 23 00:07:21 2010 +0100 @@ -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
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/qt-test.ui Sat Jan 23 00:07:21 2010 +0100 @@ -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>
--- a/src/qt.mk Sat Jan 23 00:05:23 2010 +0100 +++ b/src/qt.mk Sat Jan 23 00:07:21 2010 +0100 @@ -135,4 +135,10 @@ '$(TARGET)-ranlib' '$(1)'/lib/*.a rm -rf '$(PREFIX)/$(TARGET)/mkspecs' $(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