extension PHP Qt

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Gyger

    #1

    extension PHP Qt

    Hello,

    Three weeks ago, I have started to develop a binding extension for Qt and
    PHP 5.

    Now, I can display a dialog box containing some widgets like label, buttons
    and edit line. I have just implemented some Qt classes (not completly) like
    QApplication, QObject, QWidget, Qlabel, QLineEdit and QGrid just to test
    some very simple application. The mecanisme of the SLOT and SIGNAL is
    working but only for the existing slot and signal.

    Now, I would like to implement custom slot and signal but I have some
    problems to find the solution for this implementation.

    Does somebody has an idee on how it could be possible to implement this
    part?


    See the following code display an hello world:

    <?
    if(!extension_l oaded('php_qt') ) {
    dl('php_qt.' . PHP_SHLIB_SUFFI X);
    }
    class MyApp extends QApplication
    {
    private $grid;
    private $label_version;
    private $label_hello;
    private $quit_button;
    private $about_button;
    function __construct()
    {
    QApplication::Q Application();
    $this->init_app();
    }

    private function init_app()
    {
    $this->grid = new QGrid(2);
    $this->grid->setSpacing(10) ;
    $this->grid->setName("Bonjo ur MyApp");
    $this->label_hello = new QLabel("<center ><h1>hello</h1>",$this->grid,
    "label_hell o");
    $this->label_versio n = new QLabel("<i>PHP Qt</i></center>",$this->grid,
    "label_version" );
    $this->about_button = new QPushButton("Ab out Qt",$this->grid,
    "about_button") ;
    $this->quit_button = new QPushButton("Qu it",$this->grid, "quit_butto n");
    $this->grid->show();
    $this->connect($thi s->quit_button, SIGNAL("clicked ()"), SLOT("quit()")) ;
    $this->connect($thi s->about_button , SIGNAL"clicked( )"),
    SLOT("aboutQt() "));
    $this->setMainWidget( $this->grid);
    }
    }

    $myapp = new MyApp();
    $myapp->exec();


    ?>

    Sincerely

    Jean-Luc
  • Manuel Lemos

    #2
    Re: extension PHP Qt

    Hello,

    On 11/13/2004 10:44 AM, Gyger wrote:[color=blue]
    > Three weeks ago, I have started to develop a binding extension for Qt and
    > PHP 5.[/color]

    Thne idea is interesting but there are a couple of details that may make
    your extension uninteresting for the current PHP community:

    1. Very few people will be using PHP 5 soon.

    2. Qt Open Source license is GPL. This means that your extension has to
    be GPL to be publicly distributed and only GPL programs can use your
    extension unless they pay the commercial Qt license.

    If you agree that this may be a problem, you may want to consider using
    wxWindows instead of Qt, and also benefit of cross-platform with native
    bindings without a cost or licence limitations:



    --

    Regards,
    Manuel Lemos

    PHP Classes - Free ready to use OOP components written in PHP
    http://www.phpclasses.org/

    PHP Reviews - Reviews of PHP books and other products
    http://www.phpclasses.org/reviews/

    Metastorage - Data object relational mapping layer generator

    Comment

    • Gyger Jean-Luc

      #3
      Re: extension PHP Qt

      Manuel Lemos wrote:
      [color=blue]
      > Hello,
      >
      > On 11/13/2004 10:44 AM, Gyger wrote:[color=green]
      >> Three weeks ago, I have started to develop a binding extension for Qt and
      >> PHP 5.[/color]
      >
      > Thne idea is interesting but there are a couple of details that may make
      > your extension uninteresting for the current PHP community:
      >
      > 1. Very few people will be using PHP 5 soon.
      >
      > 2. Qt Open Source license is GPL. This means that your extension has to
      > be GPL to be publicly distributed and only GPL programs can use your
      > extension unless they pay the commercial Qt license.
      >
      > If you agree that this may be a problem, you may want to consider using
      > wxWindows instead of Qt, and also benefit of cross-platform with native
      > bindings without a cost or licence limitations:
      >
      > http://www.wxwindows.org/
      >[/color]

      I see your point of view and thank you for this.

      Of course, I would like to distribute this extension with the GPL licence.
      If I want to use Qt is because this library is a very power toolkit and I
      use it everyday as PHP. I'm checked on Internet and I do not see if
      somebody try to implement this binding, like PyQt or PerlQt etc...
      Of course, it exist PHP-GTK, but I prefer Qt than GTK. But I don't want to
      begin a discussion between this two toolkits, this is not the goal,
      everybody prefer what he want.

      In a first step, my intention is to have this extension on Linux system and
      after also for windows and other, but first on Linux.

      I thing that we can build very porwer tool with PHP and Qt.

      Comment

      • Manuel Lemos

        #4
        Re: extension PHP Qt

        Hello,

        On 11/13/2004 03:04 PM, Gyger Jean-Luc wrote:[color=blue][color=green][color=darkred]
        >>>Three weeks ago, I have started to develop a binding extension for Qt and
        >>>PHP 5.[/color]
        >>
        >>Thne idea is interesting but there are a couple of details that may make
        >>your extension uninteresting for the current PHP community:
        >>
        >>1. Very few people will be using PHP 5 soon.
        >>
        >>2. Qt Open Source license is GPL. This means that your extension has to
        >>be GPL to be publicly distributed and only GPL programs can use your
        >>extension unless they pay the commercial Qt license.
        >>
        >>If you agree that this may be a problem, you may want to consider using
        >>wxWindows instead of Qt, and also benefit of cross-platform with native
        >>bindings without a cost or licence limitations:
        >>
        >>http://www.wxwindows.org/
        >>[/color]
        >
        >
        > I see your point of view and thank you for this.
        >
        > Of course, I would like to distribute this extension with the GPL licence.
        > If I want to use Qt is because this library is a very power toolkit and I
        > use it everyday as PHP. I'm checked on Internet and I do not see if
        > somebody try to implement this binding, like PyQt or PerlQt etc...[/color]

        AFAIK, nobody is developing Qt bindings extension. The problem is that
        if you can't use Qt to develop and distribute non-GPL application
        without paying a commercial Qt license fee.

        When you posted your message to the public I assumed that you were
        interested in attracting other people to help or use your extension.

        What I am trying to tell you is that because of the license fee payment
        requirement, Qt is not interesting to many people.

        [color=blue]
        > Of course, it exist PHP-GTK, but I prefer Qt than GTK. But I don't want to
        > begin a discussion between this two toolkits, this is not the goal,
        > everybody prefer what he want.
        >
        > In a first step, my intention is to have this extension on Linux system and
        > after also for windows and other, but first on Linux.[/color]

        Either GTK, Qt and wxWindows can work either on Linux and Windows, so
        that is not a problem.

        [color=blue]
        > I thing that we can build very porwer tool with PHP and Qt.[/color]

        I suggested the wxWindows library as an alternative because it is
        practically as powerful as Qt and is LGPL, so everybody can use it
        without paying commercial license fees. Therefore, a wxWindows extension
        would be more interesting than a Qt extension. See what I mean?

        Because of the license problems, unlike a Qt extension, a wxWindows
        extension would be acceptable for in PECL. If you get your extension
        accepted in PECL, you can get much more exposure to your work and
        eventually more users and other people helping in the development.






        --

        Regards,
        Manuel Lemos

        PHP Classes - Free ready to use OOP components written in PHP
        http://www.phpclasses.org/

        PHP Reviews - Reviews of PHP books and other products
        http://www.phpclasses.org/reviews/

        Metastorage - Data object relational mapping layer generator

        Comment

        • Gyger Jean-Luc

          #5
          Re: extension PHP Qt

          Hello

          First, I am completely agree with you concerning the licence problem.

          But for me, the goal is not necessary to obtain an extension used by
          everybody. If I want to develop this extension is more fore my pleasure and
          for my proper using. After, if people like it, use it and help me, ok it is
          cool.

          I do not develop too much on Window for my pleasure and I thing that to have
          a binding php-qt on linux could be very interesting. I am sure that a lot
          of people could be interested to see this extension and why not to use it
          on linux. On Linux only, why not, that not a problem for me. I thing that
          the php community is very open for new porject and is a very big community.
          And if somebody are very interested to develop GUI on windows and do not
          want to pay something, ok, he can take GTK-PHP.

          To resume, the first goal for me, is to have this one on Linux for free and
          to have pleasure in this project.

          We have discuss a lot concerning the licence problem, but do you have a
          response for my question :-).

          See you

          Jean-Luc

          Manuel Lemos wrote:
          [color=blue]
          > Hello,
          >
          > On 11/13/2004 03:04 PM, Gyger Jean-Luc wrote:[color=green][color=darkred]
          >>>>Three weeks ago, I have started to develop a binding extension for Qt
          >>>>and PHP 5.
          >>>
          >>>Thne idea is interesting but there are a couple of details that may make
          >>>your extension uninteresting for the current PHP community:
          >>>
          >>>1. Very few people will be using PHP 5 soon.
          >>>
          >>>2. Qt Open Source license is GPL. This means that your extension has to
          >>>be GPL to be publicly distributed and only GPL programs can use your
          >>>extension unless they pay the commercial Qt license.
          >>>
          >>>If you agree that this may be a problem, you may want to consider using
          >>>wxWindows instead of Qt, and also benefit of cross-platform with native
          >>>bindings without a cost or licence limitations:
          >>>
          >>>http://www.wxwindows.org/
          >>>[/color]
          >>
          >>
          >> I see your point of view and thank you for this.
          >>
          >> Of course, I would like to distribute this extension with the GPL
          >> licence. If I want to use Qt is because this library is a very power
          >> toolkit and I use it everyday as PHP. I'm checked on Internet and I do
          >> not see if somebody try to implement this binding, like PyQt or PerlQt
          >> etc...[/color]
          >
          > AFAIK, nobody is developing Qt bindings extension. The problem is that
          > if you can't use Qt to develop and distribute non-GPL application
          > without paying a commercial Qt license fee.
          >
          > When you posted your message to the public I assumed that you were
          > interested in attracting other people to help or use your extension.
          >
          > What I am trying to tell you is that because of the license fee payment
          > requirement, Qt is not interesting to many people.
          >
          >[color=green]
          >> Of course, it exist PHP-GTK, but I prefer Qt than GTK. But I don't want
          >> to begin a discussion between this two toolkits, this is not the goal,
          >> everybody prefer what he want.
          >>
          >> In a first step, my intention is to have this extension on Linux system
          >> and after also for windows and other, but first on Linux.[/color]
          >
          > Either GTK, Qt and wxWindows can work either on Linux and Windows, so
          > that is not a problem.
          >
          >[color=green]
          >> I thing that we can build very porwer tool with PHP and Qt.[/color]
          >
          > I suggested the wxWindows library as an alternative because it is
          > practically as powerful as Qt and is LGPL, so everybody can use it
          > without paying commercial license fees. Therefore, a wxWindows extension
          > would be more interesting than a Qt extension. See what I mean?
          >
          > Because of the license problems, unlike a Qt extension, a wxWindows
          > extension would be acceptable for in PECL. If you get your extension
          > accepted in PECL, you can get much more exposure to your work and
          > eventually more users and other people helping in the development.
          >
          > http://pecl.php.net/
          >
          >
          >
          >[/color]

          Comment

          • Manuel Lemos

            #6
            Re: extension PHP Qt

            Hello,

            On 11/14/2004 01:10 AM, Gyger Jean-Luc wrote:[color=blue]
            > First, I am completely agree with you concerning the licence problem.
            >
            > But for me, the goal is not necessary to obtain an extension used by
            > everybody. If I want to develop this extension is more fore my pleasure and
            > for my proper using. After, if people like it, use it and help me, ok it is
            > cool.[/color]

            Right, but my point is that if you develop an extension that is
            interesting to more people, chances are that you get more help to solve
            the problems like the one you presented.

            [color=blue]
            > I do not develop too much on Window for my pleasure and I thing that to have
            > a binding php-qt on linux could be very interesting. I am sure that a lot
            > of people could be interested to see this extension and why not to use it
            > on linux. On Linux only, why not, that not a problem for me. I thing that
            > the php community is very open for new porject and is a very big community.
            > And if somebody are very interested to develop GUI on windows and do not
            > want to pay something, ok, he can take GTK-PHP.
            >
            > To resume, the first goal for me, is to have this one on Linux for free and
            > to have pleasure in this project.[/color]

            I suspect that you are making a confusion of Linux and GPL. If you want
            to distribute a closed source application using your extension that
            links to Qt library under Linux, you still have to buy the Qt commercial
            license. Everybody that uses your extension under Linux to distribute
            the closed source applications has to pay its own QT commercial license.

            This means that if you develop and distribute an application with your
            extension, either you open the source of your application (not just the
            extension) with GPL license or you have to pay for a Qt commercial license.

            GPL software is not free as in free beer.

            [color=blue]
            > We have discuss a lot concerning the licence problem, but do you have a
            > response for my question :-).[/color]

            Sorry, no. I was just suggesting that you use a different toolkit with
            non-GPL license so you could improve your chances of getting more help.
            In that case you could have your project accepted in PECL and it would
            boost your extension exposure in the PHP community and eventually get
            the you need.

            --

            Regards,
            Manuel Lemos

            PHP Classes - Free ready to use OOP components written in PHP
            http://www.phpclasses.org/

            PHP Reviews - Reviews of PHP books and other products
            http://www.phpclasses.org/reviews/

            Metastorage - Data object relational mapping layer generator

            Comment

            • Gyger Jean-Luc

              #7
              Re: extension PHP Qt

              Hello,

              Manuel Lemos wrote:
              [color=blue]
              > Hello,
              >
              > On 11/14/2004 01:10 AM, Gyger Jean-Luc wrote:[color=green]
              >> First, I am completely agree with you concerning the licence problem.
              >>
              >> But for me, the goal is not necessary to obtain an extension used by
              >> everybody. If I want to develop this extension is more fore my pleasure
              >> and for my proper using. After, if people like it, use it and help me, ok
              >> it is cool.[/color]
              >
              > Right, but my point is that if you develop an extension that is
              > interesting to more people, chances are that you get more help to solve
              > the problems like the one you presented.
              >[/color]

              This is true...
              [color=blue]
              >[color=green]
              >> I do not develop too much on Window for my pleasure and I thing that to
              >> have a binding php-qt on linux could be very interesting. I am sure that
              >> a lot of people could be interested to see this extension and why not to
              >> use it on linux. On Linux only, why not, that not a problem for me. I
              >> thing that the php community is very open for new porject and is a very
              >> big community. And if somebody are very interested to develop GUI on
              >> windows and do not want to pay something, ok, he can take GTK-PHP.
              >>
              >> To resume, the first goal for me, is to have this one on Linux for free
              >> and to have pleasure in this project.[/color]
              >
              > I suspect that you are making a confusion of Linux and GPL. If you want
              > to distribute a closed source application using your extension that
              > links to Qt library under Linux, you still have to buy the Qt commercial
              > license. Everybody that uses your extension under Linux to distribute
              > the closed source applications has to pay its own QT commercial license.
              >[/color]

              No no, I am not confuse. it is just that I am not interesting of closed
              source application. This is not my problem if people working with close
              source must buy a Qt licence. This is a good point for trolltech :-)
              [color=blue]
              > This means that if you develop and distribute an application with your
              > extension, either you open the source of your application (not just the
              > extension) with GPL license or you have to pay for a Qt commercial
              > license.
              >
              > GPL software is not free as in free beer.
              >
              >[color=green]
              >> We have discuss a lot concerning the licence problem, but do you have a
              >> response for my question :-).[/color]
              >
              > Sorry, no. I was just suggesting that you use a different toolkit with
              > non-GPL license so you could improve your chances of getting more help.
              > In that case you could have your project accepted in PECL and it would
              > boost your extension exposure in the PHP community and eventually get
              > the you need.
              >[/color]

              Comment

              Working...