View Full Version : Using exec in the qt/embedded application.

23rd August 2007, 12:52

i compiled and ported qt-embedded-free-3.3.5 to MIPS(DBAU1200 ) platform.i tried to execute the launcher code in the package.but could not execute it successfully. the following is my code:

struct {
const char* label;
const char* file;
command[] = {

{"Addressbook","(cd /home/addressbook; exec ./addressbook)"},

keyclass::keyclass( QWidget *parent, const char *name):
QWidget( parent, name)
setMaximumSize(640,480 );
QPushButton *textedit = new QPushButton( "Quit", this, "quit" );
textedit->setGeometry(10,80,100,20 );
textedit->setFont( QFont( "Times", 12, QFont::Bold ) );
connect(textedit, SIGNAL(clicked()),qApp, SLOT(quit()) );
QVBox *vb1 = new QVBox(this);
QPushButton *pb=0;
int ih;
for(ih=0; command[ih].label; ih++)
pb = new QPushButton(command[ih].label,vb1,command[ih].file);
connect(pb, SIGNAL(clicked()), this, SLOT(execute()));

void keyclass::run(const char* cmd)
QString c = cmd;
c += " &";
void keyclass::execute()

When i run this code on the host using QVFB. the application runs fine. i mean when i click the addressbook pushbutton,the addressbook application opens. but when i run it on board the application does not pop up. i entered ps command and got the following output:

sh-3.00# ps -ae
PID Uid VmSize Stat Command
1 root 408 S init
2 root SWN [ksoftirqd/0]
3 root SW< [events/0]
4 root SW< [khelper]
9 root SW< [kthread]
19 root SW< [kblockd/0]
26 root SW [khubd]
51 root SW [pdflush]
52 root SW [pdflush]
54 root SW< [aio/0]
53 root SW [kswapd0]
277 root SW [mtdblockd]
299 root 1120 S /bin/sh
336 root 4868 S ./launcher
345 root 3088 R /home/addressbook/addressbook
346 root 388 R ps -ae

the process is running but there is nothing in the screen.

can anyone provide me any suggestion or solutions for this ?

thanks in advance,