< Development‎ | Languages
Revision as of 18:09, 13 July 2008 by Moenicke (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

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()
           $this->quit = new QPushButton(tr("Quit"));
           $this->quit->setFont(new QFont("Times", 18, QFont::Bold));
           $this->lcd = new QLCDNumber(2);
           $this->slider = new QSlider(Qt::Horizontal);
           $this->slider->setRange(0, 99);
           $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();

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V.Legal