Hi Ferenc

Thanks, was able to install php_qt -- here is what I did on Kubuntu if anyone is interested. Not sure if i needed the php5-dev package (source) after all?

1. download php_qt
2. put in home dir somewhere
3. $ tar -xzvf php_qt-0.0.3.tar.gz
4. $ cd php_qt
5. $ phpize
6. $ ./configure --with-php_qt=/usr/include/qt4 --with-qtlib=/usr/lib/qt4 --with-php-config=/usr/bin/php-config
7. $ make
8. $ sudo make install

I noticed php_qt.so turned up in my extensions directory (/usr/lib/php5/20060613+lfs) with execute permissions whereas all the others had rw permission only. Is that right?

I've had a few problems with the tests, here is an example of test 2 (native) and 3 (with the QFont::Bold commented out)
I'm using PHP 5.2.1 and QT 4.2. Test 1 works.

Test 2
======
$ php t2.php

Fatal error: Undefined class constant 'Bold' in /xxx/t2.php on line 20

Reflection output, note  "0" constants:
Class [ <internal:php_qt> class QFont ] {

  - Constants [0] {
  }

  - Static properties [0] {
  }

  - Static methods [9] {
    Method [ <internal> static public method insertSubstitution ] {
    }

    Method [ <internal> static public method removeSubstitution ] {
    }

    Method [ <internal> static public method substitute ] {
...

Test 3
======
$ php t3.php

Fatal error: Non-static method QObject::connect() cannot be called statically in /xxx/t3.php on line 25

here is the line:
    QObject::connect(&$quit,SIGNAL('clicked()'), &$app, SLOT('quit()'));


Reflection output:

Class [ <internal:php_qt> class QObject ] {

  - Constants [0] {
  }

  - Static properties [0] {
  }

  - Static methods [2] {
    Method [ <internal> static public method disconnect ] {
    }

    Method [ <internal> static public method tr ] {
    }
  }

  - Properties [2] {
    Property [ <default> private $parent ]
    Property [ <default> protected $objectName ]
  }

  - Methods [28] {
    Method [ <internal, ctor> public method __construct ] {
    }
.....


Any ideas? I tried the svn version but that failed to build (probably me doing something wrong)

Cheers
James


On 7/9/07, Ferenc Veres <lion@netngine.hu> wrote: