Sign in Join
Wiki copytemporary

FPC and Qt/ru: what changed

Revision 2 to 3. Removed lines have a minus sign; added lines have a plus sign.

OldNewLine
1-## Contents
2-
3- * 1 Введение
4- * 1.1 Qt3
5- * 1.2 Qt/Встраивание
6- * 1.3 Qt4
7- * 2 Пример
8-
91## Введение
102
11-Существует несколько возможностей использования Qt:
3+Существует несколько возможностей использования Qt:
124
135### Qt3
146
15-[A QtC based binding by Theo](<http://www.theo.ch/kylix/Qt3pas.zip>)
7+[A QtC based binding by Theo](http://www.theo.ch/kylix/Qt3pas.zip)
168
17-[Another QtC based binding by Andreas](<http://andy.jgknet.de/oss/qt/qt3forFPC/>)
9+[Another QtC based binding by Andreas](http://andy.jgknet.de/oss/qt/qt3forFPC/)
1810
19-Первая направлена на Linux/Unix пользователей, вторая - для Win32.
11+Первая направлена на Linux/Unix пользователей, вторая - для Win32.
2012
2113### Qt/Встраивание
2214
23-[Qt/E binding](<http://users.pandora.be/Jan.Van.hijfte/qtforfpc/qtedemo.html>) \- порт FPC для ARM процессоров, который позволяет разрабатывать графические приложения для таких устройств, как Zaurus
15+[Qt/E binding](http://users.pandora.be/Jan.Van.hijfte/qtforfpc/qtedemo.html) - порт FPC для ARM процессоров, который позволяет разрабатывать графические приложения для таких устройств, как Zaurus
2416
2517### Qt4
2618
27-[Qt4 Binding](<http://users.pandora.be/Jan.Van.hijfte/qtforfpc/fpcqt4.html>) \- Qt4 библиотека для FPC
28-
29-
19+[Qt4 Binding](http://users.pandora.be/Jan.Van.hijfte/qtforfpc/fpcqt4.html) - Qt4 библиотека для FPC
3020
3121## Пример
3222
33-Данный пример разработан для использования второго пакета доступа к Qt, описанного выше.
34-```
35-var
36- app: QApplicationH;
37- btn: QPushButtonH;
38- begin
39- // create static ( interfaced handled ) QApplicationH
40- app := NewQApplicationH(ArgCount, ArgValues).get;
41- // due to a bug in fpc 1.9.5 the WideString helper methods with default parameter are disabled
42- //btn := NewQPushButtonH('Quit', nil).get;
43- btn := NewQPushButtonH(qs('Quit').get, nil, nil).get;
44- btn.setGeometry(100, 100, 300, 300);
45- btn.show;
46- // override the virtual eventFilter method of btn
47- btn.OverrideHook.eventFilter := @TTest.MyEventFilter;
48- // and install the btn as it's own eventFilter
49- btn.installEventFilter(btn);
50- // connect Qt signal to Qt slot
51- QObjectH.connect(btn, SIGNAL('clicked()'), app, SLOT('quit()'));
52- ...
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+ ...
5344```
5445
5546Если вы знаете, как QT используется в C++, вы можете увидеть, что существует не так уж много различий.
5647
5748---
58-*From the Free Pascal wiki, page "FPC and Qt/ru", as the Internet Archive kept it on 2023-04-02. 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).*
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