Is it possible for a Qt C++ application, which embeds the python
interpreter, to import and use PyQt? There can be only one
QApplication, which is created in the C++ side, so how would I use
that from the python side? 9 5449
On Thursday 01 November 2007, cgrebeld wrote:
Is it possible for a Qt C++ application, which embeds the python
interpreter, to import and use PyQt? There can be only one
QApplication, which is created in the C++ side, so how would I use
that from the python side?
QtGui.QApplication.instance()
Phil
Thursday 01 of November 2007 15:13:55 Phil Thompson napisał(a):
On Thursday 01 November 2007, cgrebeld wrote:
Is it possible for a Qt C++ application, which embeds the python
interpreter, to import and use PyQt? There can be only one
QApplication, which is created in the C++ side, so how would I use
that from the python side?
QtGui.QApplication.instance()
What I can do with this pointer?
It is possible to add window to application ?
It is possible to connect to application signals?
Bart.
On Thursday 01 November 2007, Bart. wrote:
Thursday 01 of November 2007 15:13:55 Phil Thompson napisał(a):
On Thursday 01 November 2007, cgrebeld wrote:
Is it possible for a Qt C++ application, which embeds the python
interpreter, to import and use PyQt? There can be only one
QApplication, which is created in the C++ side, so how would I use
that from the python side?
QtGui.QApplication.instance()
What I can do with this pointer?
It's not a pointer, it's a Python object that wraps the C++ pointer.
It is possible to add window to application ?
Yes.
It is possible to connect to application signals?
Yes.
Phil
Thursday 01 of November 2007 23:32:02 Phil Thompson napisał(a):
On Thursday 01 November 2007, Bart. wrote:
Thursday 01 of November 2007 15:13:55 Phil Thompson napisał(a):
On Thursday 01 November 2007, cgrebeld wrote:
Is it possible for a Qt C++ application, which embeds the python
interpreter, to import and use PyQt? There can be only one
QApplication, which is created in the C++ side, so how would I use
that from the python side?
>
QtGui.QApplication.instance()
What I can do with this pointer?
It's not a pointer, it's a Python object that wraps the C++ pointer.
So how to pass this object into embeded python interpreter (executed script)?
Anyone know any example?
Bart. schrieb:
Thursday 01 of November 2007 23:32:02 Phil Thompson napisał(a):
>On Thursday 01 November 2007, Bart. wrote:
>>Thursday 01 of November 2007 15:13:55 Phil Thompson napisał(a): On Thursday 01 November 2007, cgrebeld wrote: Is it possible for a Qt C++ application, which embeds the python interpreter, to import and use PyQt? There can be only one QApplication, which is created in the C++ side, so how would I use that from the python side? QtGui.QApplication.instance() What I can do with this pointer?
It's not a pointer, it's a Python object that wraps the C++ pointer.
So how to pass this object into embeded python interpreter (executed script)?
Anyone know any example?
You don't pass it, you _retrieve_ it in the embedded interpreter by
invoking the code given to you.
Diez
Friday 02 of November 2007 01:06:58 Diez B. Roggisch napisał(a):
So how to pass this object into embeded python interpreter (executed
script)? Anyone know any example?
You don't pass it, you _retrieve_ it in the embedded interpreter by
invoking the code given to you.
Know any example, please?
For better understand this :) I wan't add scripting to one application wrotten
with Qt.
Bart.
On Nov 2, 8:03 am, "Bart." <uz...@o2.plwrote:
Friday 02 of November 2007 01:06:58 Diez B. Roggisch napisa (a):
So how to pass this object into embeded python interpreter (executed
script)? Anyone know any example?
You don't pass it, you _retrieve_ it in the embedded interpreter by
invoking the code given to you.
Know any example, please?
For better understand this :) I wan't add scripting to one application wrotten
with Qt.
So, you have Qt/C++ application which you want to script through
python.
But why do you need PyQt for ? If you design a script api in python
and bind it using whatever binding technology (manually, boost, sip,
pyrex, ...), you should not need to use PyQt.
Or do you mean to use PyQt as the binding technology ?
Philippe
Friday 02 of November 2007 12:21:06 BlueBird napisał(a):
On Nov 2, 8:03 am, "Bart." <uz...@o2.plwrote:
Friday 02 of November 2007 01:06:58 Diez B. Roggisch napisa (a):
So how to pass this object into embeded python interpreter (executed
script)? Anyone know any example?
>
You don't pass it, you _retrieve_ it in the embedded interpreter by
invoking the code given to you.
Know any example, please?
For better understand this :) I wan't add scripting to one application
wrotten with Qt.
So, you have Qt/C++ application which you want to script through
python.
But why do you need PyQt for ? If you design a script api in python
and bind it using whatever binding technology (manually, boost, sip,
pyrex, ...), you should not need to use PyQt.
Or do you mean to use PyQt as the binding technology ?
Or I want to use PyQt in scripts to have similar gui for plugins written in
python
Or I want to extend application by scripts with PyQt.
Or better question:
How to easy add python scripting in Qt application and have almast all objects
of app accesible in scripts?
Kross could be good solution?
I realy need some examples :(
I'm looking for solutions.
You are proffesional programmers so that is why write on this list :)
Thanks for Your answars.
Bart.
On Nov 2, 7:59 am, "Bart." <uz...@o2.plwrote:
Friday 02 of November 2007 12:21:06 BlueBird napisa (a):
On Nov 2, 8:03 am, "Bart." <uz...@o2.plwrote:
Friday 02 of November 2007 01:06:58 Diez B. Roggisch napisa (a):
So how to pass this object into embeded python interpreter (executed
script)? Anyone know any example?
You don't pass it, you _retrieve_ it in the embedded interpreter by
invoking the code given to you.
Know any example, please?
For better understand this :) I wan't add scripting to one application
wrotten with Qt.
So, you have Qt/C++ application which you want to script through
python.
But why do you need PyQt for ? If you design a script api in python
and bind it using whatever binding technology (manually, boost, sip,
pyrex, ...), you should not need to use PyQt.
Or do you mean to use PyQt as the binding technology ?
Or I want to use PyQt in scripts to have similar gui for plugins written in
python
Or I want to extend application by scripts with PyQt.
Or better question:
How to easy add python scripting in Qt application and have almast all objects
of app accesible in scripts?
Kross could be good solution?
I realy need some examples :(
I'm looking for solutions.
You are proffesional programmers so that is why write on this list :)
Thanks for Your answars.
Bart.
Here is an example: http://python.pastebin.com/m18c67b3a This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Dennis Sylvester |
last post by:
Interested in any opinions, studies, etc., concerning the GUI tool(s) to use
for Python. Specifically, which would you recommend (and why) for building
GUI apps in Python:
TKinter
BOA
PyQT
...
|
by: Dave |
last post by:
I'm having a strange problem with the pyqt-tools in the latest Debian
packages. When I run
$ pyuic colortool.ui > colortool.py
Extracting init()
Extracting loadSettings()
Extracting...
|
by: simo |
last post by:
OK, so I'm at the stage where I want to make a choice between wxPython
and PyQt.
Currently I'm using wxPython mainly due to the fact that it has GPL
Linux and Windows versions.
I prefer Qt to...
|
by: svenn.are |
last post by:
Hi,
I wanted to run a program that is written in PyQt on my mac, and went
over to Riverbank to get PyQ 3.13 and SIP 4.1.1 sources.
I followed the installation guide except for the compiling...
|
by: Simon John |
last post by:
After quite a while of wxPython I'm getting back into PyQt, mainly due
to the announcement by Trolltech that they will make a GPL version of
Qt4 for Windows (and Phil-T said he will make a PyQt to...
|
by: Phil Thompson |
last post by:
Riverbank Computing is pleased to announce the release of PyQt v3.14 available
from http://www.riverbankcomputing.co.uk/.
Changes since the last release include support for QScintilla v1.5.
...
|
by: eholbroo |
last post by:
I've narrowed down my toolkit selection for my project to wxPython and
pyQt, and now i'd like to hear any opinions, war stories, peeves, etc,
about them, particularly from anyone who's used...
|
by: Phil Thompson |
last post by:
Riverbank Computing is pleased to announce the release of PyQt v4.0beta1
available from http://www.riverbankcomputing.co.uk/pyqt/.
PyQt is a comprehensive set of Qt bindings for the Python...
|
by: David Boddie |
last post by:
On Fri Nov 2 12:59:48 CET 2007, Bart. wrote:
You can use PyQt, Kross or PythonQt for this, but only PyQt will give you
a comprehensive API "out of the box".
There is code in the PyQt source...
|
by: lllomh |
last post by:
Define the method first
this.state = {
buttonBackgroundColor: 'green',
isBlinking: false, // A new status is added to identify whether the button is blinking or not
}
autoStart=()=>{
|
by: Aliciasmith |
last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
|
by: giovanniandrean |
last post by:
The energy model is structured as follows and uses excel sheets to give input data:
1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
|
by: NeoPa |
last post by:
Hello everyone.
I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report).
I know it can be done by selecting :...
|
by: Teri B |
last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course.
0ne-to-many. One course many roles.
Then I created a report based on the Course form and...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM)
Please note that the UK and Europe revert to winter time on...
|
by: NeoPa |
last post by:
Introduction
For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
|
by: isladogs |
last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, Mike...
|
by: GKJR |
last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...
| |