Developing QT-X11 code on the Beagle

I’d like to do my QT development on the Beagle rather than cross compile. I want to use the X11 version of QT rather than the embedded. I was told this is possible and it was suggested I look at the Chicago ESC [1] materials to see how. The slides [2] for the talk are very helpful; however I don’t know how to run the examples given in them [3]. I’ve even download the SD image [4] and looked around there, but didn’t find the examples or how to run them.

Can someone point me to instructions on what opkg installs I need to do to get qt installed on my Beagle an then how to compile and run a simple program like [3]?

Thanks…

–Mark

[1] http://beagleboard.org/esc
[2] http://beagle.s3.amazonaws.com/esc/jumpstart-short_6_2010_ESC.new.odp
[3]
#include
int main( int argc, char *argv[] )‏
{
QApplication myapp( argc, argv );
QLabel *mylabel = new QLabel(“Hello world”);
mylabel->show();
return myapp.exec();
}
[4] http://beagle.s3.amazonaws.com/esc/esc-20100610.tar.bz2

Maybe you should consider wxWidgets instead. It is *very* easy to
cross-compile using the Narcissus toolchain. There are some really
impressive frameworks that work right out of the box. With slight
effort you can also use OpenGLES.

I want to learn how to make QT work.

I’m creating some demos for a workshop and I want to run the whole workshop on the BeagleBoard. That is, no host computer. Therefor no cross compiling.

–Mark

It never fails, post a question and find an answer a bit later. I have a QT example compiling on the Beagle!

Here’s what I did on the Beagle

$ opkg install qt4-x11-free qt4-x11-free-dev qt4-x11-free-dev qmake2

(I don’t know if all those have to be installed.)

I tested this on the QT Hello World example [1]. I first did the example on my host computer.

$ ls

hello.cpp hello.h main.cpp
$ qmake-qt4 -project ; ls
hello.cpp hello.h main.cpp tutorial.pro
$ qmake-qt4 ; ls
hello.cpp hello.h main.cpp Makefile tutorial.pro
$ make

And it worked and ran fine. Then I copied everything to my Beagle and ran:

make clean

rm -f hello.o main.o
rm -f *~ core *.core

make

It also worked fine; however qmake doesn’t work on the Beagle:

qmake-qt4

qt_config.prf:7: include(file) requires one argument.

qmake-qt4 -v

QMake version 2.01a
Using Qt version 4.4.3 in /OE/angstrom-2008/build/tmp-angstrom_2008_1/sysroots/x86_64-linux/qt4/lib

It looks like qmake has the wrong path. This is the qmake that opkg installed. How does one fix this?

–Mark

[1] http://doc.qt.nokia.com/3.3/tutorial1-01.html

It never fails, post a question and find an answer a bit later. I have a QT
example compiling on the Beagle!
Here's what I did on the Beagle
$ opkg install qt4-x11-free qt4-x11-free-dev qt4-x11-free-dev qmake2

Is there a reason you have qt4-x11-free-dev twice? Was there
something else, like qt4-mkspecs or qt4-tools, that you meant to put
in there.

For the purpose of getting people who read this thread to follow some
good steps, can you put in 'opkg update' in ahead of those other
instructions?

(I don't know if all those have to be installed.)
I tested this on the QT Hello World example [1]. I first did the example on
my host computer.
$ ls
hello.cpp hello.h main.cpp
$ qmake-qt4 -project ; ls
hello.cpp hello.h main.cpp tutorial.pro
$ qmake-qt4 ; ls
hello.cpp hello.h main.cpp Makefile tutorial.pro
$ make
And it worked and ran fine. Then I copied everything to my Beagle and ran:
# make clean
rm -f hello.o main.o
rm -f *~ core *.core
# make
It also worked fine; however qmake doesn't work on the Beagle:
# qmake-qt4
qt_config.prf:7: include(file) requires one argument.

I know you missed a step in there. How did you source the environment?

# qmake-qt4 -v
QMake version 2.01a
Using Qt version 4.4.3 in
/OE/angstrom-2008/build/tmp-angstrom_2008_1/sysroots/x86_64-linux/qt4/lib
It looks like qmake has the wrong path. This is the qmake that opkg
installed. How does one fix this?

I think you want to be running qmake2, not qmake-qt4. Have you tried that?

Yup, I was a bit sloppy in my documentation. Corrections are below.

I found that qmake2 (or qmake-qt4, I’m not sure there is a difference) appears to be working on the Beagle. It gives the error message " qt_config.prf:7: include(file) requires one argument.", but it’s creating a functioning Makefile.

It never fails, post a question and find an answer a bit later. I have a QT
example compiling on the Beagle!
Here’s what I did on the Beagle
$ opkg install qt4-x11-free qt4-x11-free-dev qt4-x11-free-dev qmake2

Is there a reason you have qt4-x11-free-dev twice? Was there
something else, like qt4-mkspecs or qt4-tools, that you meant to put
in there.

The second qt4-x11-free-dev should have been qt4-x11-free-doc. opkg install qt4-mkspecs qt4-tools said they were already installed, so I’m guessing one of the other installs pulled them in.

For the purpose of getting people who read this thread to follow some
good steps, can you put in ‘opkg update’ in ahead of those other
instructions?

I’m going to summarize all this on the eLinux.org wiki, so I’ll be sure to include it there. I’ll post a link once it is ready.

(I don’t know if all those have to be installed.)
I tested this on the QT Hello World example [1]. I first did the example on
my host computer.
$ ls
hello.cpp hello.h main.cpp
$ qmake-qt4 -project ; ls
hello.cpp hello.h main.cpp tutorial.pro
$ qmake-qt4 ; ls
hello.cpp hello.h main.cpp Makefile tutorial.pro
$ make
And it worked and ran fine. Then I copied everything to my Beagle and ran:

make clean

rm -f hello.o main.o
rm -f *~ core *.core

make

It also worked fine; however qmake doesn’t work on the Beagle:

qmake-qt4

qt_config.prf:7: include(file) requires one argument.

I know you missed a step in there. How did you source the environment?

Before running qmake2 be sure to run:
$ source /usr/share/qt4/environment-setup
This will get all your paths on the Beagle set up correctly.

qmake-qt4 -v

QMake version 2.01a
Using Qt version 4.4.3 in
/OE/angstrom-2008/build/tmp-angstrom_2008_1/sysroots/x86_64-linux/qt4/lib
It looks like qmake has the wrong path. This is the qmake that opkg
installed. How does one fix this?

I think you want to be running qmake2, not qmake-qt4. Have you tried that?

I’m not sure there is a difference [1].

–Mark

–Mark
[1] http://doc.qt.nokia.com/3.3/tutorial1-01.html

[1] http://lists.linuxtogo.org/pipermail/openembedded-devel/2009-August/012882.html

Here [1] are my notes on using Qt on the Beagle. All the tutorials I’ve tried have worked on the Beagle. Right now I’m trying to get qwt [2] running on the Beagle so I can do some real-time plotting of data.

–Mark

[1] http://elinux.org/ECE497_LabXX_Qt
[2] http://qwt.sourceforge.net/index.html

Hi,

in order to upgrade the angstrom version on my beagle C4 to a newer version build with narcissus, I wanted to replace u-boot and all this stuff too, just to have consequent new versions of all this things. I did something like:

nand unlock
nand erase

on u-boot prompt (not 100% sure about typos, but if so I would have got an error msg, I guess). Unfortunately, since I have done that I get no u-boot prompt anymore. Even if I try to press the user button before powering up the system, I get some control signs on the terminal and "0W" between.

I tried to recover with steps written on elinux.org/BeagleBoardRecovery but no success.

Does someone have any hint for me? What does 0W mean? I found nothing related!

Terminal settings should be well, because it was working before and I didn't change anything.

Thanks, sascha

Here [1] are my notes on using Qt on the Beagle. All the tutorials I've tried have worked on the Beagle. Right now I'm trying to get qwt [2] running on the Beagle so I can do some real-time plotting of data.

opkg update ; opkg install libqwt-dev

Koen:
Thanks for the tip. However, that’s version 5.2 and I got v6 from the qwt site.

–Mark

Koen:
Thanks for the tip. However, that's version 5.2 and I got v6 from the qwt
site.

Are you really sure you need the bleeding edge?

I use some stuff that will use qwt and will look at updating the
recipes. A quick look at the qwt site does not show any details about
the differences between teh 5.x and 6.x versions. They are still
releasing updates to the 5.x.x series.

Philip

Phillip:
I’m never sure which version to use. I think I have v6 of qwt working now, so I’ll stick with it. If I run into trouble, I’ll take what opkg installs.

–Mark

I find it is nice to use the version in the distribution, so I do hope
you try your apps out with that one too (or submit a patch to upgrade
the version in the distribution).