Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / qt / 2008-04

qt laz arm tpanel prob

9 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Terry Kemp

hi,

I have a problem in qt on arm with tpanel borders and captions being drawn too high on the component.
the caption text is centered left to right properly but is at the top of the panel rather than the middle. the border seems to draw around this point also rather than the actual area it paints so the bottom border is about a third up the component and the top border is gone.

the software when run from lazarus (x86_64 compiled with qt as lcl) works fine, so its an arm issue.

Any pointers?

I am using qt4pas-V1.61_Qt4.3.1 compiled against
qtopia-core-opensource-src-4.4.0-snapshot-20080218

compiling with latest (todays) fpc-svn and lazarus svn for arm eabi and running on a Gumstix

Thanks

Terry

Paul Ishenin
to Terry Kemp

Terry Kemp ?????:

Show quoted text 20 lines
hi, I have a problem in qt on arm with tpanel borders and captions being drawn too high on the component. the caption text is centered left to right properly but is at the top of the panel rather than the middle. the border seems to draw around this point also rather than the actual area it paints so the bottom border is about a third up the component and the top border is gone. the software when run from lazarus (x86_64 compiled with qt as lcl) works fine, so its an arm issue. Any pointers? I am using qt4pas-V1.61_Qt4.3.1 compiled against qtopia-core-opensource-src-4.4.0-snapshot-20080218 compiling with latest (todays) fpc-svn and lazarus svn for arm eabi and running on a Gumstix

My first minds about problem is that qt guilty for bug. But it is also possible that problem is in combination of arm and lcl-qt. I never tested it on arm. Btw, TPanel is TQtFrame in terms of qtwidgets.pas. So you can check all the code TQtFrame has. To draw panel borders we are using Frame3D (qtwinapi.inc). And also (you
can step it and check all coordinates).

Best regards,
Paul Ishenin.

Den Jean
to Terry Kemp: I have a problem in qt on arm with tpanel borders and captions being drawn too high on…
am Terry Kemp wrote
I am using qt4pas-V1.61_Qt4.3.1 compiled against qtopia-core-opensource-src-4.4.0-snapshot-20080218

1) Embedded not supported target yet.
The WIN/MAC/X11 sources are the same,
except for the defines, but embedded were not.
I think this is still the case (haven't tried lately)

I should extend the binding generator for
a new target platform. As this is probably a lot of work and I did not have a professional incentive anymore, it just did not happen yet. The current Qt2/E binding is fine for the Zaurus(gcc 2.9x.y).
I do not have another arm platform.

2) Qt 4.4.0:
I am still at Qt 4.3.X.
BTW, Qt 4.4 is still beta.

Suggestion: try qtopia 4.3.4

regards,

Den Jean

Terry Kemp
to Den Jean
Den Jean wrote
1) Embedded not supported target yet. The WIN/MAC/X11 sources are the same, except for the defines, but embedded were not. I think this is still the case (haven't tried lately)

understood. works OK though - mostly.
In fact the only obvious issues I have struck so far are... no session manager so no window borders, weird panel borders if color changed, and shapes don't know where to draw themselves so the go to top left of screen.

Show quoted text 14 lines
I should extend the binding generator for a new target platform. As this is probably a lot of work and I did not have a professional incentive anymore, it just did not happen yet. The current Qt2/E binding is fine for the Zaurus(gcc 2.9x.y). I do not have another arm platform. 2) Qt 4.4.0: I am still at Qt 4.3.X. BTW, Qt 4.4 is still beta. Suggestion: try qtopia 4.3.4

the Gumstix hardware was locked into 18bit mode for display and qt 4.4.0 beta has support for this which I am testing.
they have just released a 16bit version so now I can try with stable version of QT.

I had to undefine -D BINUX and def out a couple of other session manager calls to compile the binding for arm. I have compiled the binding for arm against qtopia-core and an OE build of qtopia-X11 for arm. so far I have only linked laz programs with the qt 4.4.0 libs. will try the others and report on progress later.

Thanks

Terry

Den Jean
to Terry Kemp
pm Terry Kemp wrote
I had to undefine -D BINUX and def out a couple of other session manager

I tried anyhow:
http://users.pandora.be/Jan.Van.hijfte/qtforfpc/qtopia_qt4pas-V1.63_Qt4.3.4.tar.gz http://users.pandora.be/Jan.Van.hijfte/qtforfpc/qtopia_demos-V1.63_Qt4.3.4.tar.gz

I only compiled lib (no demos) i386
I configured qtopia without options

(qtopia-core-opensource-src-4.3.4)

To get things compiled, I defined the new platform as such:

"QTOPIA" = ["Q_WS_QWS", "Q_OS_LINUX","Q_OS_UNIX", "QT_NO_SESSIONMANAGER"]

I do not know why QT_NO_SESSIONMANAGER gets defined when qtopia is defined without options.

For some strange reason, you have to add libQtNetwork.so.4 to the compile script for qtopia apps (google). I need to do this to find the actual value of the enums through c++ programs.

To get intermediate results, I avoided all methods that have parameters like QRgb of QWSDisplay (not yet available, need some work). But they are needed for lazarus/lcl/qt.

new compile script for lib: compile_lib_qtopia.sh (not arm ofcourse)

regards,

Den Jean

Den Jean
to Den Jean
pm Den Jean wrote
To get intermediate results, I avoided all methods that have parameters like QRgb of QWSDisplay (not yet available, need some work). But they are needed for lazarus/lcl/qt.

update:
http://users.pandora.be/Jan.Van.hijfte/qtforfpc/qtopia_qt4pas-V1.64_Qt4.3.4.tar.gz http://users.pandora.be/Jan.Van.hijfte/qtforfpc/qtopia_demos-V1.64_Qt4.3.4.tar.gz

I fixed handling of qrgb (not a class) and
removed QPaintDevice_qwsDisplay (class qwsDisplay not in docs)

Terry Kemp
to Den Jean
Den Jean wrote 11 lines
On Wednesday 02 April 2008 11:00:12 pm Den Jean wrote: > To get intermediate results, I avoided all methods that have parameters > like QRgb of QWSDisplay (not yet available, need some work). But they are > needed for lazarus/lcl/qt. update: http://users.pandora.be/Jan.Van.hijfte/qtforfpc/qtopia_qt4pas-V1.64_Qt4.3.4.tar.gz http://users.pandora.be/Jan.Van.hijfte/qtforfpc/qtopia_demos-V1.64_Qt4.3.4.tar.gz I fixed handling of qrgb (not a class) and removed QPaintDevice_qwsDisplay (class qwsDisplay not in docs)

Thanks for looking at this Den.

I am cross-compiling qtopia-core-opensource-src-4.3.4 with ./configure -embedded arm -qt-mouse-tslib -armfpa -prefix /usr

then I had to modify your script to...
---------------------------------------------
#!/bin/env bash
#export QT4=/usr/lib/qt4
export QT4=../qtopia-core-opensource-src-4.3.4/
export QT4I=$QT4/include
export LD_LIBRARY_PATH=$QT4/lib
if [ -e "$LD_LIBRARY_PATH/libQtCore.so.4" ]
then
arm-linux-g++ -D QTOPIA -D Q_WS_QWS -I. -I$QT4I -I$QT4I/Qt -I $QT4I/QtGui -I$QT4I/QtCore -Iqlcl qtpas.cpp -o libqt4intf.so -shared -fPIC -L$QT4/lib -lQtCore -lQtGui -lQtNetwork -Xlinker "-soname=libqt4intf.so"
arm-linux-strip --strip-all libqt4intf.so
else
echo "Please Modify location of Qt4 in this script" fi
----------------------------------------------

I just have one issue with 1.64 that is preventing me cross-compiling a lazarus QT program...

[tkemp at werewolf mflo-laz]$ ppcrossarm-2.3.1 project1.lpr -darm -dqt -dFPC_ARMEL -CfSOFT
Free Pascal Compiler version 2.3.1 [2008/04/02] for arm Copyright (c) 1993-2007 by Florian Klaempfl
Target OS: Linux for ARM
Compiling project1.lpr
Assembling project1
Linking project1
/home/tkemp/bin//libqt4intf.so: undefined reference to `QPixmap::handle() const'
project1.lpr(19) Error: Error while linking
project1.lpr(19) Fatal: There were 1 errors compiling module, stopping Fatal: Compilation aborted

where should I look for this?

regards

Terry

Den Jean
to Terry Kemp
pm Terry Kemp wrote
/home/tkemp/bin//libqt4intf.so: undefined reference to `QPixmap::handle() const' project1.lpr(19) Error: Error while linking

kwrite src/gui/image/qpixmap.h:
....
#if defined(Q_WS_X11) || defined(Q_WS_QWS)

    Qt::HANDLE handle() const;

#endif
....
--> so qpixmap::handle should have been present

but objdump -T -C libQtGui.so.4 | grep -i pixmap | grep -i handle reveals it isn't

it should be like qwsBytesPerLine:
objdump -T -C libQtGui.so.4 | grep -i pixmap | grep -i qwsBytesPerLine 001d1f50 g DF .text 00000029 Base QPixmap::qwsBytesPerLine() const

I do not know why it is not present, but I added it to the list of functions to skip:

http://users.pandora.be/Jan.Van.hijfte/qtforfpc/qtopia_demos-V1.65_Qt4.3.4.tar.gz http://users.pandora.be/Jan.Van.hijfte/qtforfpc/qtopia_qt4pas-V1.65_Qt4.3.4.tar.gz

regards,

Den Jean

Terry Kemp
to Den Jean
Den Jean wrote 6 lines

Good news is that works and program builds.
Running on Gumstix shows - result is unchanged, tpanels are still konfuzed. No probs with lazarus x86_64 build.

I will see if I can use the same method to build bindings for qtopia-core-opensource-src-4.3.4 for my x86_64 ??? and see if its a qtopia core issue vs qt4-x11, else it must be fpc arm issue.

Terry