You are not logged in.

1

Monday, June 14th 2010, 1:20am

Application freeze when using gradient in stylesheet (Qt/Embedded 4.4.3) on S3C2443/Linux

I'm writing an application using Qt/Embedded 4.4.3 on an S3C2443 (ARM 920T core) development board running Linux, and have got to the stage where I'm displaying a window with some QFrames containing some QLabels showing text.

I've been experimenting with the look of the app using stylesheets, and have found that if I try to set any type of gradient fill as the background or foreground colour on any of the widgets, the app freezes (using 100% CPU) before it gets a chance to display the window. Setting a solid background colour works fine, as does setting an image as the background. I've also tried drawing a gradient fill directly in the code using a QPainter, and that also works.

I've spent hours googling for this problem, but can't find a single mention of it anywhere.
Can anyone offer any help?

This post has been edited 1 times, last edit by "philgp" (Jun 14th 2010, 10:00am)


2

Thursday, June 17th 2010, 11:13pm

OK, I've found the solution to this problem myself.

The Qt libs were configured incorrectly - they needed to be built with -armfpa specified on the configure script's command line. Without -armfpa, the script fails to auto-detect the byte-ordering used on the target hardware and picks an incorrect default.

I discovered this after running into another symptom - using QString::arg() to format a double precision floating point number caused a similar application lock-up.

I might have found this solution sooner, but I'd kind of assumed the libraries would be correctly built, because they were the pre-compiled libraries supplied with the development kit!

This post by "xuebao" (Monday, June 21st 2010, 2:07am) has been deleted by user "Junior" (Wednesday, July 14th 2010, 4:13pm) with the following reason: spammer

4

Wednesday, July 21st 2010, 9:28pm

Hey I am having the same problem and I tried this fix would you be able to give me a copy of your compile options or any other advice as to what I might be doing wrong?

5

Wednesday, July 21st 2010, 11:28pm

OK. Here's the command line I used to configure Qt:

(NOTE: first of all make sure the path to the ARM cross-compiler is in the PATH environment variable!)

./configure -verbose -confirm-license -embedded arm -xplatform qws/linux-arm-g++ \
-prefix /usr/local/QtEmbedded-4.4.3 -hostprefix /usr/local/DigiEL-5.2/usr \
-nomake examples -nomake demos -nomake docs -nomake translations -optimized-qmake \
-no-rpath -no-pch -no-largefile -no-accessibility -no-stl -no-qt3support -no-webkit -qt-sql-sqlite \
-depths 15,16 -qt-kbd-usb -qt-mouse-tslib -no-gif -no-libtiff -no-libmng -qt-libjpeg \
-system-freetype -armfpa -I /usr/local/DigiEL-5.2/usr/include/freetype2 >config.log 2>&1

You'll probably need to tweak those options for your own purposes.
The "/usr/local/QtEmbedded-4.4.3" following -prefix is the path specifying where fonts and plugins will be placed in the target embedded system's filesystem.

The "/usr/local/DigiEL-5.2/usr" following -hostprefix is the path specifying where the Qt header & libraries are to be installed on the host system (where the cross-compiler expects to find them), which in my case is an Eclipse IDE & GCC cross-compiler toolchain provided by the manufacturer of the development board I'm writing code for.

I also chose to use a newer version of the freetype library than the one packaged with Qt 4.4.3 (which I cross-compiled and installed before Qt), hence the need to specify the path to the freetype headers.

You'll also notice that I piped the output of configure into config.log so I could peruse it afterwards to make sure it all went OK. The configure script took about 10 minutes to run on my system, so be patient.

After configuring, I just needed to run 'make', then 'make install'.

Let me know how you get on with that!

This post has been edited 1 times, last edit by "philgp" (Jul 22nd 2010, 9:04am)


Rate this thread