$ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/kylix3/bin
を先に実行して下さい。GUIアプリケーションを配布する場合には共有ライブラリも一緒に配布する必要があります。
| $tar -xvf ibxpress.so.6.9.tar $./ibx_install |
uses
... Qt, HTTPApp, ...
private
...
evt:QEvent_hookH;
h:TMethod;
...
public
...
function EventFilter(Sender: QObjectH; Event: QEventH):Boolean; cdecl;
...
|
procedure TForm1.FormCreate(Sender: TObject);
begin
...
QWidget_setAcceptDrops(Listbox1.handle,True);
evt := Qevent_hook_create(Listbox1.handle);
TEventFilterMethod(h) := EventFilter;
Qt_hook_hook_events(evt,h);
...
end;
procedure TForm1.FormDestroy(Sender: TObject);
begin
QEvent_hook_destroy(evt);
end;
function TForm1.EventFilter(Sender: QObjectH; Event: QEventH):Boolean;
var
qms:QMimeSourceH;
s:WideString;
DropFiles:TStringList;
i:Integer;
begin
result := False;
if not QEvent_isQDropEvent(Event) then
Exit;
qms := QDropEvent_to_QMimeSource(QDropEventH(Event));
if QEvent_isQDragEnterEvent(Event) or
QEvent_isQDragMoveEvent(Event) then
QDropEvent_acceptAction(QDropEventH(Event),QTextDrag_canDecode(qms))
else if QTextDrag_canDecode(qms) then
begin
QTextDrag_decode(qms,@s);
DropFiles := TStringList.Create;
try
Listbox1.Items.Clear;
DropFiles.Text := s;
for i:=0 to DropFiles.Count-1 do
Listbox1.Items.Add(StringReplace(HTTPDecode(DropFiles[i]),'file://','',[rfIgnoreCase]));
finally
DropFiles.Free;
end;
end;
end;
|
| $ tar zxfv k3patches.3.10.tgz $ cd k3patches |
| $ ./installpatch |
| $ cd k3patches/paches $ rm QImageList.pas.patch $ cd .. $ ./installpatch |
| # cd /usr/X11R6/lib # ln -s libX11.so.6 libX11.so # apt-get install gtk+ # apt-get install libstdc++2_9 # rpm -i compat-libstdc++-6.2-2.9.0.16.i386.rpm |
| # mount /mnt/cdrom # cd /mnt/cdrom # ./setup.sh |