Difference between revisions of "Development/Languages/PHP-Qt"

Jump to: navigation, search
m (grammar)
 
(6 intermediate revisions by 5 users not shown)
Line 1: Line 1:
 +
 
{{note| PHP-Qt is still under development. }}
 
{{note| PHP-Qt is still under development. }}
  
PHP is a widely used programming language with support for object orientation. You can find more about the language and it's interpreter at [http://www.php.net php.net], or read about the PHP compiler at [http://www.roadsend.com Roadsend.com].
+
PHP is a widely used programming language with support for object orientation. You can find more about the language and its interpreter at [http://www.php.net php.net], or read about the PHP compiler at [http://www.roadsend.com 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.
 
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.
  
<code php>
+
<syntaxhighlight lang="php">
 
     class MyWidget extends QWidget
 
     class MyWidget extends QWidget
 
     {
 
     {
Line 41: Line 42:
 
     }
 
     }
  
</code>
+
</syntaxhighlight>
  
== Further informations ==
+
== More information ==
*[http://www.php-qt.org PHP-Qt Website]
+
*[http://developer.berlios.de/projects/php-qt/ PHP-Qt Website]

Latest revision as of 02:07, 22 August 2012

noframe
 
Note
PHP-Qt is still under development.

PHP is a widely used programming language with support for object orientation. You can find more about the language and its 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);
        }
    }

[edit] More information


This page was last modified on 22 August 2012, at 02:07. This page has been accessed 9,812 times. Content is available under Creative Commons License SA 3.0 as well as the GNU Free Documentation License 1.2.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V.Legal