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 5479
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: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
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,...
|
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...
| |