Sign in Join

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

Mailing lists / qt / 2008-09

Qt Embedded

12 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

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

Den Jean

Hi,

I added Qt Embedded based on qt-embedded-linux-opensource-src-4.4.2.tar.gz, The tar generator script calls the tars qtopia, but it is not really qtopia.

Before I needed to handle Pixmap_handle differently for this platform, but in 4.4.2 there is actually no source difference needed with the linux tar, all is handled with conditional defines (still the define QTOPIA for embedded).

regards,

Den Jean.

Reply by email

Terry Kemp
to Den Jean
Den Jean wrote 13 lines
Hi, I added Qt Embedded based on qt-embedded-linux-opensource-src-4.4.2.tar.gz, The tar generator script calls the tars qtopia, but it is not really qtopia. Before I needed to handle Pixmap_handle differently for this platform, but in 4.4.2 there is actually no source difference needed with the linux tar, all is handled with conditional defines (still the define QTOPIA for embedded). regards, Den Jean.

Thanks for the explanation Den

Reply by email

Terry Kemp
to Terry Kemp
Terry Kemp wrote 14 lines
On Sun, 2008-09-21 at 15:26 +0200, Den Jean wrote: > Hi, > > I added Qt Embedded based on qt-embedded-linux-opensource-src-4.4.2.tar.gz, > The tar generator script calls the tars qtopia, but it is not really qtopia. > > Before I needed to handle Pixmap_handle differently for this platform, > but in 4.4.2 there is actually no source difference needed > with the linux tar, all is handled with conditional defines (still > the define QTOPIA for embedded). > > regards, > > Den Jean.

Finally got to test it.
Couple of probs...

[tkemp at systems steri-laz-qt]$ ppcrossarm project1.lpr -darm -darmlclqt Free Pascal Compiler version 2.3.1 [2008/08/19] for arm Copyright (c) 1993-2008 by Florian Klaempfl
Target OS: Linux for ARM
Compiling project1.lpr
Assembling project1
Linking project1
/build/gumstix/gumstix-fpc/lazarus-svn/lcl/units/arm-linux/qt/qtwidgets.o: In function `TQTDESIGNWIDGET__RAISEWIDGET': qtwidgets.pas:9267: undefined reference to `qtx11waitforwindowmanager' qtwidgets.pas:9267: undefined reference to `qtx11waitforwindowmanager' qtwidgets.pas:9267: undefined reference to `qtx11waitforwindowmanager' qtwidgets.pas:9267: undefined reference to `qtx11waitforwindowmanager' qtwidgets.pas:9267: undefined reference to `qtx11waitforwindowmanager' qtwidgets.pas:9267: undefined reference to `QFileDialog_filters' project1.lpr(24) Error: Error while linking
project1.lpr(24) Fatal: There were 1 errors compiling module, stopping Fatal: Compilation aborted

qtx11waitforwindowmanager is in the x86_64 .so but not the arm .so I assume this is correct with QTOPIA defined.
No clue on the QFileDialog_filters one.

Thanks

Terry

Reply by email

Terry Kemp
to Terry Kemp
Terry Kemp wrote
Finally got to test it. Couple of probs...

Sorry -
fired off with the new bindings without updating lcl qt interface stuff.

Seems that the new version of qt4.pas breaks some stuff

Anyway - all sorted.

Reply by email

zeljko
to Terry Kemp
Terry Kemp wrote 10 lines
On Wed, 2008-10-01 at 14:11 +1300, Terry Kemp wrote: > Finally got to test it. > Couple of probs... Sorry - fired off with the new bindings without updating lcl qt interface stuff. Seems that the new version of qt4.pas breaks some stuff Anyway - all sorted.

Don't use new bindings (4.4.2), it's just for testing purposes. qtx11waitforwindowmanager() is easy to fix (I'll do that).

Reply by email

zeljko
to Terry Kemp: Finally got to test it. Couple of probs... [tkemp at systems steri-laz-qt]$ ppcrossarm…
Terry Kemp wrote 9 lines
Assembling project1 Linking project1 /build/gumstix/gumstix-fpc/lazarus-svn/lcl/units/arm-linux/qt/qtwidgets.o: In function `TQTDESIGNWIDGET__RAISEWIDGET': qtwidgets.pas:9267: undefined reference to `qtx11waitforwindowmanager' qtwidgets.pas:9267: undefined reference to `qtx11waitforwindowmanager' qtwidgets.pas:9267: undefined reference to `qtx11waitforwindowmanager' qtwidgets.pas:9267: undefined reference to `qtx11waitforwindowmanager' qtwidgets.pas:9267: undefined reference to `qtx11waitforwindowmanager' qtwidgets.pas:9267: undefined

This is fixed in r 16818.

reference to `QFileDialog_filters'

Don't use 4.4.2 bindings yet :)

Reply by email

Terry Kemp
to zeljko
zeljko wrote
This is fixed in r 16818.

Thnx

Don't use 4.4.2 bindings yet :)

C'mon, someones gotta test it ;)

Actually - I have it all working now, except I had to guess at the bpp definition for the extra arbg stuff, fixed the longword/widestring error and I commented out some of the broken dialog stuff I don't use on arm anyway.

In another thread I need to ask how to use the other stuff in qt thats not part of the lcl - like radialGradients for example. I can get it to work using the binding demo code by defining a gradient and passing to qbrush on create but not from lazarus. Tbrush and QBrushH errors etc. Bit vague I know but the code I was playing with looked at the wiki about accessing the qt widgets directly but it didn't seem to help me.

Terry

Reply by email

zeljko
to Terry Kemp
Terry Kemp wrote 23 lines
On Wed, 2008-10-01 at 08:23 +0200, zeljko wrote: > This is fixed in r 16818. Thnx > Don't use 4.4.2 bindings yet :) C'mon, someones gotta test it ;) Actually - I have it all working now, except I had to guess at the bpp definition for the extra arbg stuff, fixed the longword/widestring error and I commented out some of the broken dialog stuff I don't use on arm anyway. In another thread I need to ask how to use the other stuff in qt thats not part of the lcl - like radialGradients for example. I can get it to work using the binding demo code by defining a gradient and passing to qbrush on create but not from lazarus. Tbrush and QBrushH errors etc. Bit vague I know but the code I was playing with is at work. I looked at the wiki about accessing the qt widgets directly but it didn't seem to help me.

You are probably doing something wrong ....pass piece of that code into mailing list

Show quoted text 8 lines
Terry _______________________________________________ Qt mailing list http://www.lazarus.freepascal.org/mailman/listinfo/qt

Reply by email

Den Jean
to Terry Kemp: Finally got to test it. Couple of probs... [tkemp at systems steri-laz-qt]$ ppcrossarm…
Terry Kemp wrote
qtx11waitforwindowmanager is in the x86_64 .so but not the arm .so I assume this is correct with QTOPIA defined.

I only define LINUX and QTOPIA, Qt has much more refinement.

This is one is available if Q_WS_X11 is defined

#if defined(Q_WS_X11)
        extern void qt_x11_wait_for_window_manager(QWidget *mainWin);
        qt_x11_wait_for_window_manager(mainWin);
#endif

Here are my current platform definitions:

"BINUX" = ["Q_WS_X11","Q_OS_LINUX","Q_OS_UNIX"] "MSWINDOWS" = ["Q_WS_WIN"]
"DARWIN" = ["Q_WS_MAC","Q_OS_UNIX"]
"QTOPIA" = ["Q_WS_QWS", "Q_OS_LINUX","Q_OS_UNIX", "QT_NO_SESSIONMANAGER"]

So if you compile with the define QTOPIA and not with BINUX then it should not be there.

for the lcl code: use BINUX(qt4.pas) and not LINUX(fpc) to surround these calls.

No clue on the QFileDialog_filters one.

This one has been deprecated by the Trolls. I can add DEPRECATED to the defines, there are not many, but this way you will not notice easily you are using a deprecated function.

Reply by email

Terry Kemp
to Den Jean: I only define LINUX and QTOPIA, Qt has much more refinement. This is one is available if…
Den Jean wrote 24 lines
On Wednesday 01 October 2008 03:11:28 Terry Kemp wrote: > qtx11waitforwindowmanager is in the x86_64 .so but not the arm .so > I assume this is correct with QTOPIA defined. I only define LINUX and QTOPIA, Qt has much more refinement. This is one is available if Q_WS_X11 is defined #if defined(Q_WS_X11) extern void qt_x11_wait_for_window_manager(QWidget *mainWin); qt_x11_wait_for_window_manager(mainWin); #endif Here are my current platform definitions: "BINUX" = ["Q_WS_X11","Q_OS_LINUX","Q_OS_UNIX"] "MSWINDOWS" = ["Q_WS_WIN"] "DARWIN" = ["Q_WS_MAC","Q_OS_UNIX"] "QTOPIA" = ["Q_WS_QWS", "Q_OS_LINUX","Q_OS_UNIX", "QT_NO_SESSIONMANAGER"] So if you compile with the define QTOPIA and not with BINUX then it should not be there. for the lcl code: use BINUX(qt4.pas) and not LINUX(fpc) to surround these calls.

In qt4.pas BINUX gets defined...

{$IF DEFINED(LINUX) or DEFINED(FREEBSD) or DEFINED(NETBSD)}
  {$DEFINE BINUX}
  QtIntf = 'libqt4intf.so';
{$ENDIF}

So is LINUX defined automatically (predefined somewhere?) if using arm-linux and if so is BINUX defined as well as QTOPIA if I compile with -dQTOPIA (for lcl)

Reply by email

Den Jean
to Terry Kemp
Show quoted text 11 lines
In qt4.pas BINUX gets defined... {$IF DEFINED(LINUX) or DEFINED(FREEBSD) or DEFINED(NETBSD)} {$DEFINE BINUX} QtIntf = 'libqt4intf.so'; {$ENDIF} So is LINUX defined automatically (predefined somewhere?) if using arm-linux and if so is BINUX defined as well as QTOPIA if I compile with -dQTOPIA (for lcl)

What fpc defines:
http://www.freepascal.org/docs-html/prog/progap7.html#x323-323000G

what qt4.pas uses to conditionally allow certain methods: "BINUX" = defines based upon fpc defines "MSWINDOWS" = same as fpc define
"DARWIN" = same as fpc define
"QTOPIA" = you need to define it, fpc cannot sense, it is not the same as arm, because then you could not try qtopia on qvfb on i386.

sample:
{$ifdef BINUX or DARWIN or QTOPIA }
procedure QCoreApplication_watchUnixSignal(signal: Integer; watch: Boolean);
cdecl; external QtIntf name 'QCoreApp
lication_watchUnixSignal';
{$endif}

Note that the c++/c code of the binding
needs these aswell.

#if defined BINUX || DARWIN || QTOPIA
void QCoreApplication_watchUnixSignal(int signal, bool watch) {

	QCoreApplication::watchUnixSignal(signal, watch);

}

#endif

compile qtopia script therefore contains -D QTOPIA: 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 libQtCore.so.4 libQtGui.so.4 -Xlinker "-soname=libqt4intf.so"

regards,

Den Jean

Reply by email