[Qt] uclibc + libqt4intf- EAccessViolation : Access violation
Den Jean
Den.Jean at telenet.be
Mon Feb 1 20:21:13 CET 2010
On Monday 01 February 2010 11:41:25 Nataraj S Narayan wrote:
> #1 0x401c0ab4 in QObject_hook::eventFilter () from /usr/lib/libqt4intf.so
>
in embedded, first try a very small c++ app like
qt-embedded-linux-opensource-src-4.5.3/examples/tutorials/addressbook/part1
to verify your qt setup
then try a very small freepascal writeln hello world app in fpc (*without* Qt)
then translate the qt tutor to a pascal qt4 app with the binding.(see below)
compiling the Qt libs and the Qt binding with debug info if still problems
addressbook.lpr:
http://users.telenet.be/Jan.Van.hijfte/qtforfpc/addressbook.png
program addressbook;
{$mode objfpc}{$H+}
uses
{$IFDEF UNIX}{$IFDEF UseCThreads}
cthreads,
{$ENDIF}{$ENDIF}
Classes,SysUtils,Types,Qt4;
type
TAddressBook = class(TObject)
public
Handle : QWidgetH;
NameLine : QLineEditH;
AddressText : QTextEditH;
constructor Create;
end;
constructor TAddressBook.Create;
var
NameLabel : QLabelH;
AddressLabel : QLabelH;
MainLayout : QGridLayoutH;
w : WideString;
begin
Handle:=QWidget_create;
w:='Name:';
NameLabel:=QLabel_Create(@w);
NameLine:=QLineEdit_create;
w:='Address:';
AddressLabel:=QLabel_create(@w);
AddressText:=QTextEdit_create;
MainLayout:=QGridLayout_create;
QGridLayout_addWidget(MainLayout,NameLabel,0,0);
QGridLayout_addWidget(MainLayout,NameLine,0,1);
QGridLayout_addWidget(MainLayout,AddressLabel,1,0,QtAlignTop);
QGridLayout_addWidget(MainLayout,AddressText,1,1);
QWidget_setLayout(Handle,MainLayout);
w:='Simple Address Book';
QWidget_setWindowTitle(Handle, at w);
end;
var
App : QApplicationH;
AddrBook : TAddressBook;
begin
App:=QApplication_create(@Argc,Argv);
AddrBook:=TAddressBook.Create;
QWidget_show(AddrBook.Handle);
QCoreApplication_exec;
end.
More information about the Qt
mailing list