Is there an interest for working with QT from Pharo ? I make no promises just something I was interested in trying.
A must for any serious dekstop application with Pharo, but it is a hudge task Le 29/05/2017 à 14:35, Dimitris Chloupis a écrit :
Is there an interest for working with QT from Pharo ? I make no promises just something I was interested in trying.
-- Dr. Geo http://drgeo.eu
Hi dimitris We would love to have that. We could have a Spec binding and build automatically applications in QT for people willing. Esteban always wanted to have a Cocoa binding used the same way. But this is large task Stef On Thu, Jun 1, 2017 at 2:44 PM, Hilaire <hilaire@drgeo.eu> wrote:
A must for any serious dekstop application with Pharo, but it is a hudge task
Le 29/05/2017 à 14:35, Dimitris Chloupis a écrit :
Is there an interest for working with QT from Pharo ? I make no promises just something I was interested in trying.
-- Dr. Geo http://drgeo.eu
There is a way to make this into a small task One of my experiments of testing my Pharo to Python bridge (What I have named project "Atlas") was to build a QT hello world example. It created a problem because I was using python threads that QT does not like (it offers its own kind of threads) but after changing the code to use no threads, it worked. My bridge is not like UFFI where anything has to be wrapped because unlike C , Python is a dynamic language so there is no need for wrappers because Atlas allows dynamic execution of code. But of course there is the issues of data types and how they can be mapped to Pharo and the fact that PyQT free version is GPL and commercial is 500 dollars which sits of course on top of the commercial version of QT. So at the time I decided to not pursue it. I will give it a try and see how far it can goes, at worst I may offer a partial solution to using QT with Pharo. Then someone else can take it from there if there is genuine interest and expand it to more features. On Fri, Jun 2, 2017 at 12:01 AM Stephane Ducasse <stepharo.self@gmail.com> wrote:
Hi dimitris
We would love to have that. We could have a Spec binding and build automatically applications in QT for people willing. Esteban always wanted to have a Cocoa binding used the same way. But this is large task
Stef
On Thu, Jun 1, 2017 at 2:44 PM, Hilaire <hilaire@drgeo.eu> wrote:
A must for any serious dekstop application with Pharo, but it is a hudge task
Le 29/05/2017 à 14:35, Dimitris Chloupis a écrit :
Is there an interest for working with QT from Pharo ? I make no promises just something I was interested in trying.
-- Dr. Geo http://drgeo.eu
As long as your having fun yourself, sounds like a good idea. If you manage a minimum viable product like example code, wider interest may arise. Good luck. cheers -ben On Sat, Jun 3, 2017 at 4:00 AM, Dimitris Chloupis <kilon.alios@gmail.com> wrote:
There is a way to make this into a small task
One of my experiments of testing my Pharo to Python bridge (What I have named project "Atlas") was to build a QT hello world example. It created a problem because I was using python threads that QT does not like (it offers its own kind of threads) but after changing the code to use no threads, it worked.
My bridge is not like UFFI where anything has to be wrapped because unlike C , Python is a dynamic language so there is no need for wrappers because Atlas allows dynamic execution of code. But of course there is the issues of data types and how they can be mapped to Pharo and the fact that PyQT free version is GPL and commercial is 500 dollars which sits of course on top of the commercial version of QT. So at the time I decided to not pursue it.
I will give it a try and see how far it can goes, at worst I may offer a partial solution to using QT with Pharo. Then someone else can take it from there if there is genuine interest and expand it to more features.
On Fri, Jun 2, 2017 at 12:01 AM Stephane Ducasse <stepharo.self@gmail.com> wrote:
Hi dimitris
We would love to have that. We could have a Spec binding and build automatically applications in QT for people willing. Esteban always wanted to have a Cocoa binding used the same way. But this is large task
Stef
On Thu, Jun 1, 2017 at 2:44 PM, Hilaire <hilaire@drgeo.eu> wrote:
A must for any serious dekstop application with Pharo, but it is a hudge task
Le 29/05/2017 à 14:35, Dimitris Chloupis a écrit :
Is there an interest for working with QT from Pharo ? I make no promises just something I was interested in trying.
-- Dr. Geo http://drgeo.eu
With regard toÂ
the fact that PyQT free version is GPL and commercial is 500 dollars which sits of course on top of the commercial version of QTÂ There is an alternative to PyQt, that the Qt company intends to make a first-class citizen of the Qt ecosystem, namely PySide(2). The project languished after Nokia sold Qt to what is know "The Qt Company", but development is ongoing again. For details, see https://wiki.qt.io/PySide2 and https://groups.google.com/d/msg/pyside-dev/pqwzngAGLWE/kXUpXBhILAAJ For the record, I do not use PySide (or PyQt for that matter) and I do not know what the current status is of this endeavor.
Kind regards, Pieter. On Friday, June 2, 2017 10:02 PM, Dimitris Chloupis <kilon.alios@gmail.com> wrote: There is a way to make this into a small task One of my experiments of testing my Pharo to Python bridge (What I have named project "Atlas") was to  build a QT hello world example. It created a problem because I was using python threads that QT does not like (it offers its own kind of threads) but after changing the code to use no threads, it worked. My bridge is not like UFFI where anything has to be wrapped because unlike C , Python is a dynamic language so there is no need for wrappers because Atlas allows dynamic execution of code. But of course there is the issues of data types and how they can be mapped to Pharo and the fact that PyQT free version is GPL and commercial is 500 dollars which sits of course on top of the commercial version of QT. So at the time I decided to not pursue it. I will give it a try and see how far it can goes, at worst I may offer a partial solution to using QT with Pharo. Then someone else can take it from there if there is genuine interest and expand it to more features.  On Fri, Jun 2, 2017 at 12:01 AM Stephane Ducasse <stepharo.self@gmail.com> wrote: Hi dimitris We would love to have that. We could have a Spec binding and build automatically applications in QT for people willing. Esteban always wanted to have a Cocoa binding used the same way. But this is large task Stef On Thu, Jun 1, 2017 at 2:44 PM, Hilaire <hilaire@drgeo.eu> wrote: A must for any serious dekstop application with Pharo, but it is a hudge task Le 29/05/2017 à 14:35, Dimitris Chloupis a écrit :
Is there an interest for working with QT from Pharo ? I make no promises just something I was interested in trying.
-- Dr. Geo http://drgeo.eu
One other thing, what part of Qt you would like to use, the widget world or the QML world? I have been thinking about building a UI in QML and using Pharo to implement the model. This could be doable. However, the best idea I came up with (up till now) would require custom glue code in C++ (although I do like the idea of integrating with PyQt or PySide instead). But I have only been toying with the idea, nothing more. I intended to post the message to the mailing list before, but by accident I sent it directly to another mailing list participant. My sincere apologies for that... Kind regards, Pieter. On Friday, June 2, 2017 10:02 PM, Dimitris Chloupis <kilon.alios@gmail.com> wrote: There is a way to make this into a small task One of my experiments of testing my Pharo to Python bridge (What I have named project "Atlas") was to  build a QT hello world example. It created a problem because I was using python threads that QT does not like (it offers its own kind of threads) but after changing the code to use no threads, it worked. My bridge is not like UFFI where anything has to be wrapped because unlike C , Python is a dynamic language so there is no need for wrappers because Atlas allows dynamic execution of code. But of course there is the issues of data types and how they can be mapped to Pharo and the fact that PyQT free version is GPL and commercial is 500 dollars which sits of course on top of the commercial version of QT. So at the time I decided to not pursue it. I will give it a try and see how far it can goes, at worst I may offer a partial solution to using QT with Pharo. Then someone else can take it from there if there is genuine interest and expand it to more features. Â
Hello, Some month ago I did a project that allows to generate python code from Pharo, Python3Generator [1]. I used it to play with Matplotlib [2] and it works pretty well (I should announce these projects one day... :-) ). Seeing your mail, I took a look at it to see if it was possible to make a PyQt windows pop using it and it works (I'll put the source code to try by yourself at the end of this mail). Of course, once you start Qt events loop, the image is frozen (see the screenshot attached to this mail). :-) Nevertheless, P3G is not complete and yet, you can not retrieve values from Python side, it is just used to generate and execute code without getting results back from an execution. I guess this will be problematic for buttons callbacks for example. But it could probably be extended to retrieve these values... P3G can use your Atlas Python interpreter but, I could not get a window to pop with it. I don't know why since the interpreter returns no error. Julien Links: [1]: https://github.com/juliendelplanque/Python3Generator [2]: https://github.com/juliendelplanque/MatplotLibBridge Load P3G: Metacello new baseline: 'Python3Generator'; repository: 'github://juliendelplanque/Python3Generator/repository'; load The source code (#<- message is used to build an assignation, #=> is used to access the attribute of an object): "Use and initialize the FFI interpreter." P3GInterpreter useFFIInterpreter. P3GInterpreter current pathToPython: '/usr/bin/python3'. "instructions will hold the instructions of the program we are going to build." instructions := P3GInstructionsList new. "Import sys and PyQt." sys := 'sys' asP3GIdentifier. pyqt := 'PyQt4' asP3GIdentifier => 'QtGui'. instructions add: sys import; add: pyqt import. "Instantiate Qt App." app := 'app' asP3GIdentifier. instructions add: app <- ((pyqt => 'QApplication') callWith: #(())). "Create a simple window with a progress bar." w := 'w' asP3GIdentifier. instructions add: w <- (pyqt => 'QMainWindow') call; add: (((w => 'statusBar') call => 'showMessage') callWith: #('Ready')); add: ((w => 'setGeometry') callWith: #(300 300 250 150)); add: (( w => 'setWindowTitle') callWith: #(Statusbar)); add: (w => 'show') call; add: ((sys => 'exit') callWith: { (app => 'exec_') call }). "Execute the program built (you can inspect instructions to see the source code)." instructions execute. On 02/06/17 22:00, Dimitris Chloupis wrote:
There is a way to make this into a small task
One of my experiments of testing my Pharo to Python bridge (What I have named project "Atlas") was to build a QT hello world example. It created a problem because I was using python threads that QT does not like (it offers its own kind of threads) but after changing the code to use no threads, it worked.
My bridge is not like UFFI where anything has to be wrapped because unlike C , Python is a dynamic language so there is no need for wrappers because Atlas allows dynamic execution of code. But of course there is the issues of data types and how they can be mapped to Pharo and the fact that PyQT free version is GPL and commercial is 500 dollars which sits of course on top of the commercial version of QT. So at the time I decided to not pursue it.
I will give it a try and see how far it can goes, at worst I may offer a partial solution to using QT with Pharo. Then someone else can take it from there if there is genuine interest and expand it to more features.
On Fri, Jun 2, 2017 at 12:01 AM Stephane Ducasse <stepharo.self@gmail.com> wrote:
Hi dimitris
We would love to have that. We could have a Spec binding and build automatically applications in QT for people willing. Esteban always wanted to have a Cocoa binding used the same way. But this is large task
Stef
On Thu, Jun 1, 2017 at 2:44 PM, Hilaire <hilaire@drgeo.eu> wrote:
A must for any serious dekstop application with Pharo, but it is a hudge task
Le 29/05/2017 à 14:35, Dimitris Chloupis a écrit :
Is there an interest for working with QT from Pharo ? I make no promises just something I was interested in trying. -- Dr. Geo http://drgeo.eu
Yes, yes and one more yes ^-^ I love qt and i like to dive into the world of Pharo: To use both together reads wonderful, thanks a lot for this proposal. So i get the idea to integrate it via Python, which is also from my side a fine approach. For alternatives, see also: https://github.com/seanchas116/libqmlbind And, while aimed for staticly typed languages; https://github.com/filcuc/DOtherSide And there is also a generic binding in the making for Rust, it might inspire you as well: https://cgit.kde.org/scratch/vandenoever/rust_qt_binding_generator.git/log/ -- View this message in context: http://forum.world.st/Pharo-and-QT-tp4948544p4962997.html Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
participants (7)
-
Ben Coman -
Dimitris Chloupis -
Hilaire -
Julien Delplanque -
Pieter Swinkels -
Shalok Shalom -
Stephane Ducasse