Sign in Join
Wiki copytemporary

FPC and Qt/ru: what changed

Revision 0 to 1. Removed lines have a minus sign; added lines have a plus sign.

Title: FPC and Qt/ru

OldNewLine
1+## Введение
2+
3+Существует несколько возможностей использования Qt:
4+
5+### Qt3
6+
7+[A QtC based binding by Theo](http://www.theo.ch/kylix/Qt3pas.zip)
8+
9+[Another QtC based binding by Andreas](http://andy.jgknet.de/oss/qt/qt3forFPC/)
10+
11+Первая направлена на Linux/Unix пользователей, вторая - для Win32.
12+
13+### Qt/Встраивание
14+
15+[Qt/E binding](http://users.pandora.be/Jan.Van.hijfte/qtforfpc/qtedemo.html) - порт FPC для ARM процессоров, который позволяет разрабатывать графические приложения для таких устройств, как Zaurus
16+
17+### Qt4
18+
19+[Qt4 Binding](http://users.pandora.be/Jan.Van.hijfte/qtforfpc/fpcqt4.html) - Qt4 библиотека для FPC
20+
21+## Пример
22+
23+Данный пример разработан для использования второго пакета доступа к Qt, описанного выше.
24+
25+``` pascal
26+ var
27+ app: QApplicationH;
28+ btn: QPushButtonH;
29+ begin
30+ // create static ( interfaced handled ) QApplicationH
31+ app := NewQApplicationH(ArgCount, ArgValues).get;
32+ // due to a bug in fpc 1.9.5 the WideString helper methods with default parameter are disabled
33+ //btn := NewQPushButtonH('Quit', nil).get;
34+ btn := NewQPushButtonH(qs('Quit').get, nil, nil).get;
35+ btn.setGeometry(100, 100, 300, 300);
36+ btn.show;
37+ // override the virtual eventFilter method of btn
38+ btn.OverrideHook.eventFilter := @TTest.MyEventFilter;
39+ // and install the btn as it's own eventFilter
40+ btn.installEventFilter(btn);
41+ // connect Qt signal to Qt slot
42+ QObjectH.connect(btn, SIGNAL('clicked()'), app, SLOT('quit()'));
43+ ...
44+```
45+
46+Если вы знаете, как QT используется в C++, вы можете увидеть, что существует не так уж много различий.
47+
48+---
49+*From the Free Pascal wiki, page "FPC and Qt/ru", as it stood on 2020-02-16 after a change by Trev, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's [[Licensing]] page. If you have concerns about this material, [message the admin](/wiki-contact).*

Back to history