473,788 Members | 2,725 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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
Jul 17 '05 #1
6 4621
Hello,

On 11/13/2004 10:44 AM, Gyger wrote:
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/

--

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
http://www.meta-language.net/metastorage.html
Jul 17 '05 #2
Manuel Lemos wrote:
Hello,

On 11/13/2004 10:44 AM, Gyger wrote:
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/


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.

Jul 17 '05 #3
Hello,

On 11/13/2004 03:04 PM, Gyger Jean-Luc wrote:
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/

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...


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.

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.
Either GTK, Qt and wxWindows can work either on Linux and Windows, so
that is not a problem.

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


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/


--

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
http://www.meta-language.net/metastorage.html
Jul 17 '05 #4
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:
Hello,

On 11/13/2004 03:04 PM, Gyger Jean-Luc wrote:
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/

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...


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.

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.


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

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


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/


Jul 17 '05 #5
Hello,

On 11/14/2004 01:10 AM, Gyger Jean-Luc wrote:
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.
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.

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.
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.

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


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
http://www.meta-language.net/metastorage.html
Jul 17 '05 #6
Hello,

Manuel Lemos wrote:
Hello,

On 11/14/2004 01:10 AM, Gyger Jean-Luc wrote:
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.
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.


This is true...
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.
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.


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 :-)
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.

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


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.


Jul 17 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
2762
by: Torsten Mohr | last post by:
Hi, i write an extension module in C at the moment. This module does some work on some own data types that consist of some values. The functions that can change the data are written in C. The question came up if this is by itself thread safe, if some two or more threads try to change these data types, are the C functions by themselves are "atomic" or can they
3
2063
by: man-in-nature | last post by:
Hello, I have already read several existing posts about xsd:extension, but do not find something useful to my test case. I have one xml file and one xsd file. I can use a simple command line (C#) program to validate the xml file against the xsd file without any error. The problem is that when I validate the same xml file within VisualStudio 2003, I got five errors, which are all related to xsd:extension. It seems that those "problem"...
5
3399
by: Jeffry van de Vuurst | last post by:
Hi, I'm working on an xml schema and I'm running into some problems relating substitutionGroups and extensions. This xsd validates fine: There are three elements and three complex types and every element has the type of some complexType. <?xml version="1.0" encoding="UTF-8"?>
7
2922
by: Adam | last post by:
Im trying to add an httphandler for all *.sgf file extensions. I have developed the handler, 1. installed it into the gac 2. added it to the machine.config: <httpHandlers> <add verb="*" path="*.sgf" type="CustomExtensionHandler, Extenders.CustomExtensionHandler, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d831d925597c1031" validate="True"/> </httpHandlers>
4
6031
by: pepcag | last post by:
I used http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconalteringsoapmessageusingsoapextensions.asp as a template to create a very simple web method with soap extension. The code like this: public string HelloWorld() { return "Hello World.";
1
2175
by: Brian Henry | last post by:
Just thought maybe someone here would like to know this. It's an example code I just created quickly on how to figure out the name of a type of file based on its extension (say for example .DOC) would return "Microsoft Word Document"... tired doing this before with SHGetFileInfo or what ever its called, but that seemed to require a phyiscal file to be there, where this you can just give it a file extension with no file. Private Function...
0
2146
by: robert | last post by:
Hi all, I'm having a hard time resolving a namespace issue in my wsdl. Here's an element that explains my question, with the full wsdl below: <definitions name="MaragatoService" targetNamespace="http://swaMaragatoNS" xmlns:tns="http://swaMaragatoNS" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
6
4220
by: tommybiegs | last post by:
I'm having a weird problem. I can't seem to force php to load an extension using php.ini, but it loads perfectly if I use dl() at the beginning of a test script. In php.ini I've got: extension_dir = "/correct/verified/path/to/extension/dir/" extension=imagick.so Apache will not restart if both those lines are present in php.ini
1
4369
Ganesh9u
by: Ganesh9u | last post by:
Hi All, import org.sf.feeling.swt.win32.extension.hook.Hook; import org.sf.feeling.swt.win32.extension.hook.data.HookData; import org.sf.feeling.swt.win32.extension.hook.data.MouseHookData; import org.sf.feeling.swt.win32.extension.hook.listener.HookEventListener; public class HotMouse {
0
9498
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10373
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10177
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
7519
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6750
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5403
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5538
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3677
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2897
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.