首页| 论坛| 消息

标题:【提问】tmake產生makefile
作者:btopcst
日期:2005-10-28 23:40
内容:

環境:qt-embedded-2.3.7
/////////////////////////////////////////////////////////////////////////////////
hello.pro內容:
TEMPLATE = app
CONFIG += qt warn_on release
HEADERS = hello.h
SOURCES = hello.cpp \
main.cpp
TARGET = hello
DEPENDPATH=../../include
REQUIRES=
/////////////////////////////////////hello.h///////////////////////////////////////
#ifndef HELLO_H
#define HELLO_H
#include

class Hello : public QWidget
{
Q_OBJECT
public:
Hello( const char *text, QWidget *parent=0, const char *name=0 );
signals:
void clicked();
protected:
void mouseReleaseEvent( QMouseEvent * );
void paintEvent( QPaintEvent * );
private slots:
void animate();
private:
QString t;
int b;
};
#endif
/////////////////////hello.cpp//////////////////////////////
#include "hello.h"
#include
#include
#include
#include

/*
Constructs a Hello widget. Starts a 40 ms animation timer.
*/
Hello::Hello( const char *text, QWidget *parent, const char *name )
: QWidget(parent,name), t(text), b(0)
{
QTimer *timer = new QTimer(this);
connect( timer, SIGNAL(timeout()), SLOT(animate()) );
timer->start( 40 );
resize( 260, 130 );
}

/*
This private slot is called each time the timer fires.
*/
void Hello::animate()
{
b = (b + 1) & 15;
repaint( FALSE );
}

/*
Handles mouse button release events for the Hello widget.
We emit the clicked() signal when the mouse is released inside
the widget.
*/
void Hello::mouseReleaseEvent( QMouseEvent *e )
{
if ( rect().contains( e->pos() ) )
emit clicked();
}

/*
Handles paint events for the..


#1 [angusliu 10-30 22:37]
确认环境变量是否设置正确,如TMAKEDIR,TMAKEPATH
我用qt-2.3.7时,编译应用程序喜欢用如下这种步骤编译:)
qmake -project
tmake -o Makefile hello.pro
make
#2 [btopcst 11-01 20:12]
下面是引用angusliu于2005-10-30 22:37发表的:
确认环境变量是否设置正确,如TMAKEDIR,TMAKEPATH
我用qt-2.3.7时,编译应用程序喜欢用如下这种步骤编译:)
qmake -project
tmake -o Makefile hello.pro
.......
我的環境變數:
export QTDIR=/root/qt-2.3.7
export TMAKEDIR=/root/tmake-1.13
export TMAKEPATH=/root/tmake-1.13/lib
執行動作:
cd qt-2.3.7/examples/hello
qmake -project
tmake -o Makefile hello.pro
make

請問一下…我有那些動作有問題…能否指教一下…謝謝
#3 [youngki 11-01 20:27]
环境里没有加入相应的库,应该是这样
#4 [btopcst 11-01 23:39]
下面是引用youngki于2005-11-01 20:27发表的:
环境里没有加入相应的库,应该是这样
什麼意思…我不懂…你指的是qt的lib嗎??
那是要export那個參數…能否告知…謝謝
#5 [youngki 11-02 08:41]
qt/e的lib
export LD_LIBARARY_PATH =......

<< 1 2 >> (1/2)

回复 发表
主题 版块