KDE TechBase is a Wiki - You can help! Please contribute! Questions?
Please ask development related questions in the KDE Community Forum.
Please ask development related questions in the KDE Community Forum.
Development/Languages/PHP-Qt
Languages: عربي | Asturianu | Català | Česky | Kaszëbsczi | Dansk | Deutsch | English | Esperanto | Español | Eesti | فارسی | Suomi | Français | Galego | Italiano | 日本語 | 한국어 | Norwegian | Polski | Português Brasileiro | Română | Русский | Svenska | Slovenščina | српски | Türkçe | Tiếng Việt | Українська | 简体中文 | 繁體中文
PHP is a widely used programming language with support for object orientation. You can find more about the language and it's interpreter at php.net, or read about the PHP compiler at Roadsend.com.
The purpose of PHP bindings is enabling PHP developers to write desktop applications using the powerful technologies provided by Qt, KDE and related frameworks. For now the Qt API is covered.
class MyWidget extends QWidget { private $quit; private $slider; private $layout; private $lcd; function __construct() { parent::__construct(); $this->quit = new QPushButton(tr("Quit")); $this->quit->setFont(new QFont("Times", 18, QFont::Bold)); $this->lcd = new QLCDNumber(2); $this->lcd->setSegmentStyle(QLCDNumber::Filled); $this->slider = new QSlider(Qt::Horizontal); $this->slider->setRange(0, 99); $this->slider->setValue(0); $this->connect($this->quit, SIGNAL('clicked()'), QApplication::instance(), SLOT('quit()')); $this->connect($this->slider, SIGNAL('valueChanged(int)'), $this->lcd, SLOT('display(int)')); $this->layout = new QVBoxLayout(); $this->layout->addWidget($this->quit); $this->layout->addWidget($this->lcd); $this->layout->addWidget($this->slider); $this->setLayout($this->layout); } }




