test program for package qt

This commit is contained in:
Volker Grabsch 2010-01-23 00:07:21 +01:00
parent feccf81bb9
commit 4a1e1b1fcb
4 changed files with 134 additions and 0 deletions

15
src/qt-test.cpp Normal file
View File

@ -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();
}

6
src/qt-test.pro Normal file
View File

@ -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

107
src/qt-test.ui Normal file
View File

@ -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>&amp;File</string>
</property>
<addaction name="actionQuit"/>
</widget>
<addaction name="menuFile"/>
</widget>
<widget class="QStatusBar" name="statusbar"/>
<action name="actionQuit">
<property name="text">
<string>&amp;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>

View File

@ -135,4 +135,10 @@ define $(PKG)_BUILD
'$(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