[PyKDE] QWidget.setStyle Crashes
I have a simple script (attached) which tries to set the style of a button. In both windows and linux, it crashes regardless of what style I try to use. (seg fault from setStyle(), no traceback info) I am trying to change the style of a few buttons for Windows XP users. In my real code the buttons are loaded from ui file, but neither works. My version PyQt version is 3.13 and Qt is 3.3.3 Any help? Thanks __ This electronic message may contain proprietary and confidential information of Verint Systems Inc., its affiliates and/or subsidiaries. The information is intended to be for the use of the individual(s) or entity(ies) named above. If you are not the intended recipient (or authorized to receive this e-mail for the intended recipient), you may not use, copy, disclose or distribute to anyone this message or any information contained in this message. If you have received this electronic message in error, please notify us by replying to this e-mail. (1) teststyle.py Description: teststyle.py ___ PyKDE mailing listPyKDE@mats.imk.fraunhofer.de http://mats.imk.fraunhofer.de/mailman/listinfo/pykde
[PyKDE] Reimplementing virtual functions (in python?) for a GUI class
I have discovered an issue in the QTimeEdit class, Trolltech as provided a work-around for now which re-implements a virtual function. I can do this easily enough in C++, but how do I do it in python? Also, regardless of PyQt or C++, how do I use the new class in a designer .ui file? __ This electronic message may contain proprietary and confidential information of Verint Systems Inc., its affiliates and/or subsidiaries. The information is intended to be for the use of the individual(s) or entity(ies) named above. If you are not the intended recipient (or authorized to receive this e-mail for the intended recipient), you may not use, copy, disclose or distribute to anyone this message or any information contained in this message. If you have received this electronic message in error, please notify us by replying to this e-mail. (1) ___ PyKDE mailing listPyKDE@mats.imk.fraunhofer.de http://mats.imk.fraunhofer.de/mailman/listinfo/pykde
[PyKDE] Translating UI files
How does one go about translating UI files when apps are completely written in python with PyQt? I dont even know if you can translate them normally. In my app I use QWidgetFactory to create a dialog from a ui file. I need to translate that, preferably without making a ui file for each language. TIA __ This electronic message may contain proprietary and confidential information of Verint Systems Inc., its affiliates and/or subsidiaries. The information is intended to be for the use of the individual(s) or entity(ies) named above. If you are not the intended recipient (or authorized to receive this e-mail for the intended recipient), you may not use, copy, disclose or distribute to anyone this message or any information contained in this message. If you have received this electronic message in error, please notify us by replying to this e-mail. (1) ___ PyKDE mailing listPyKDE@mats.imk.fraunhofer.de http://mats.imk.fraunhofer.de/mailman/listinfo/pykde
[PyKDE] Sip Crashes Python when -u on win32
I was able to get everything to work in release, but in debug mode, when sip loads, it crashes, with the following traceback. The error is new style getargs format but argument is not a tuple PyErr_Restore(_object * 0x, _object * 0x01843020, _object * 0x) line 43 + 4 bytes PyErr_SetObject(_object * 0x, _object * 0x01843020) line 57 + 9 bytes PyErr_SetString(_object * 0x, const char * 0x0f5dc15c `string') line 70 + 13 bytes vgetargs1(_object * 0x0f5621af, char * 0x01159b98, char * * 0x07d18358, int 928652) line 240 + 17 bytes PyArg_ParseTuple(_object * 0x01159b98, char * 0x07d18358) line 54 LIBSIP! 07d11236() () I am compiling against python 2.3 in debug mode. I have no idea why this is __ This electronic message may contain proprietary and confidential information of Verint Systems Inc., its affiliates and/or subsidiaries. The information is intended to be for the use of the individual(s) or entity(ies) named above. If you are not the intended recipient (or authorized to receive this e-mail for the intended recipient), you may not use, copy, disclose or distribute to anyone this message or any information contained in this message. If you have received this electronic message in error, please notify us by replying to this e-mail. (1) ___ PyKDE mailing listPyKDE@mats.imk.fraunhofer.de http://mats.imk.fraunhofer.de/mailman/listinfo/pykde
RE: [PyKDE] Static member functions
Followup: I seem to have found sender(), but I get the usual 'you can't do this because it was not created in python' error. So I still don't know how to go about it. Here's a sample class that I just typed up: class testDlg: def __init__(self): self.dlg=QWidgetFactory.create('lineedit.ui') #just a dialog with 2 lineedit boxes named lineedit1 and lineedit2, clicking between them should print out different instances self.dlg.connect(self.dlg.child('lineedit1'), SIGNAL('lostFocus()'), self.lostFocus) def lostFocus(self): print self.dlg.sender() # error here def show(self): self.dlg.show() if __name__=='__main__': d=testDlg() d.show() qApp.exec_loop() -Original Message- From: [EMAIL PROTECTED] [mailto:pykde- [EMAIL PROTECTED] On Behalf Of Hihn, Jason Sent: Tuesday, December 14, 2004 3:20 PM To: Phil Thompson; Diez B. Roggisch Cc: [EMAIL PROTECTED] Subject: RE: [PyKDE] Static member functions I think this is exactly what I want, but I do not know how to use it. Can I get an example in PyQt? Thanks again! -Original Message- From: [EMAIL PROTECTED] [mailto:pykde- [EMAIL PROTECTED] On Behalf Of Phil Thompson Sent: Tuesday, December 14, 2004 11:09 AM To: Diez B. Roggisch Cc: [EMAIL PROTECTED] Subject: Re: [PyKDE] Static member functions Hi, I think I understand your problem as follows: You have a non- parametrized signal, lostFocus, that you want to connect to one slot - but then somehow magically there shall be a reference to the object the signal came from is passed. If that's the case then just use QObject.sender(). The slot must be a method of a QObject derived class - but that wouldn't seem to be a problem in this case. Phil ___ PyKDE mailing list[EMAIL PROTECTED] http://mats.imk.fraunhofer.de/mailman/listinfo/pykde __ This electronic message may contain proprietary and confidential information of Verint Systems Inc., its affiliates and/or subsidiaries. The information is intended to be for the use of the individual(s) or entity(ies) named above. If you are not the intended recipient (or authorized to receive this e-mail for the intended recipient), you may not use, copy, disclose or distribute to anyone this message or any information contained in this message. If you have received this electronic message in error, please notify us by replying to this e-mail. (1) ___ PyKDE mailing list[EMAIL PROTECTED] http://mats.imk.fraunhofer.de/mailman/listinfo/pykde __ This electronic message may contain proprietary and confidential information of Verint Systems Inc., its affiliates and/or subsidiaries. The information is intended to be for the use of the individual(s) or entity(ies) named above. If you are not the intended recipient (or authorized to receive this e-mail for the intended recipient), you may not use, copy, disclose or distribute to anyone this message or any information contained in this message. If you have received this electronic message in error, please notify us by replying to this e-mail. (1) ___ PyKDE mailing list[EMAIL PROTECTED] http://mats.imk.fraunhofer.de/mailman/listinfo/pykde
RE: [PyKDE] Static member functions
I think this is exactly what I want, but I do not know how to use it. Can I get an example in PyQt? Thanks again! -Original Message- From: [EMAIL PROTECTED] [mailto:pykde- [EMAIL PROTECTED] On Behalf Of Phil Thompson Sent: Tuesday, December 14, 2004 11:09 AM To: Diez B. Roggisch Cc: [EMAIL PROTECTED] Subject: Re: [PyKDE] Static member functions Hi, I think I understand your problem as follows: You have a non- parametrized signal, lostFocus, that you want to connect to one slot - but then somehow magically there shall be a reference to the object the signal came from is passed. If that's the case then just use QObject.sender(). The slot must be a method of a QObject derived class - but that wouldn't seem to be a problem in this case. Phil ___ PyKDE mailing list[EMAIL PROTECTED] http://mats.imk.fraunhofer.de/mailman/listinfo/pykde __ This electronic message may contain proprietary and confidential information of Verint Systems Inc., its affiliates and/or subsidiaries. The information is intended to be for the use of the individual(s) or entity(ies) named above. If you are not the intended recipient (or authorized to receive this e-mail for the intended recipient), you may not use, copy, disclose or distribute to anyone this message or any information contained in this message. If you have received this electronic message in error, please notify us by replying to this e-mail. (1) ___ PyKDE mailing list[EMAIL PROTECTED] http://mats.imk.fraunhofer.de/mailman/listinfo/pykde
RE: [PyKDE] Static member functions
Ok, my problem is that I want to provide some function that is called by the widget that generates the signal. I have an On-Screen Keyboard. Each text-control gets assigned a lostFocus handler. I need that handler to do one thing. I need it to store that widget's id (or instance) so the OSK knows where to write the characters to. The issue I am having is in my previous environment, I could just say the equivalent of: Dlg.child('text1').lostFocusEvent=some_func() #0 params passed And some_func() would be given the 'this' object by the interpreter (because it was then a member function of the class). This is not the case for python. Assigning a global some_func() to an object does not get the self object, even though it is now in the object's name space. For connects, I tried: Dlg.connect(dlg.child('text'), SIGNAL('lostFocus()'), setKeyboardDest) #0 params passed Dlg.connect(dlg.child('text'), SIGNAL('lostFocus()'), self.setKeyboardDest) # 1 param, self, passed, but this is the dialog instance Furthermore, the dialogs that receive input are created from QWidgetFactory, so I don't know if I can subclass the text controls at runtime. I am lost, lost, lost. I figure the ultimate way out is to assign each slot to a separate function, but that is not elegant, since they would all be of the form: Def text1_lostfocus(self) Globals.lastText=self.dlg.child('text1') ... repeat for each text box... Then connect the signal to each indivisual slot. It is quite a waste though. Also, adding text boxes would require recoding of the python script, where the old method would not. -Original Message- From: [EMAIL PROTECTED] [mailto:pykde- [EMAIL PROTECTED] On Behalf Of Sundance Sent: Monday, December 13, 2004 7:38 PM To: [EMAIL PROTECTED] Subject: Re: [PyKDE] Static member functions I heard Hihn, Jason said: How can I do this in python? It may be I'm not getting your question, but... What's the problem exactly? You can have global objects (which includes functions) all you want, really. Example: ---[ globalstuff.py ]-- data = None --- ---[ A.py ] import globalstuff def functionA(): globalstuff.data = 42 --- ---[ B.py ] import globalstuff def functionB(): print The global data contains:, globalstuff.data --- ---[ main.py ]- import globalstuff from A import functionA from B import functionB # Set the global bit of data with functionA() from module A: functionA() # Print the global bit of data with functionB() from module B: functionB() # Set the global bit of data ourselves: globalstuff.data = Nobody expects the Spanish Inquisition! # Then print it with functionB() from module B: functionB() print See, Jason? I don't understand what your problem is, exactly. --- Does this answer your question? -- S. ___ PyKDE mailing list[EMAIL PROTECTED] http://mats.imk.fraunhofer.de/mailman/listinfo/pykde __ This electronic message may contain proprietary and confidential information of Verint Systems Inc., its affiliates and/or subsidiaries. The information is intended to be for the use of the individual(s) or entity(ies) named above. If you are not the intended recipient (or authorized to receive this e-mail for the intended recipient), you may not use, copy, disclose or distribute to anyone this message or any information contained in this message. If you have received this electronic message in error, please notify us by replying to this e-mail. (1) ___ PyKDE mailing list[EMAIL PROTECTED] http://mats.imk.fraunhofer.de/mailman/listinfo/pykde
[PyKDE] Static member functions
I need to have a lostfocus event store the object that created the event. In my previous language, I had a global function that could do it, because I could bring it in to the class by setting it at run-time. The this object, would then be the object that generated the event. It was then easy enough to say : global lostFicusObj=this Then later, I could use this.whatever() How can I do this in python? Id really hate to have a function for every possible widget. Thanks. __ This electronic message may contain proprietary and confidential information of Verint Systems Inc., its affiliates and/or subsidiaries. The information is intended to be for the use of the individual(s) or entity(ies) named above. If you are not the intended recipient (or authorized to receive this e-mail for the intended recipient), you may not use, copy, disclose or distribute to anyone this message or any information contained in this message. If you have received this electronic message in error, please notify us by replying to this e-mail. (1) ___ PyKDE mailing list[EMAIL PROTECTED] http://mats.imk.fraunhofer.de/mailman/listinfo/pykde
RE: [PyKDE] ActiveX
Well my work on this assignment is drawing to a close. What we have works really well. In a few months, I expect to be brought back on so our work can be made to work in a browser. What we have now is a x-platform solution. We store python scripts ui files on our device (ppc), and they are fetched by the PC application. We then run them in an interpreter that is embedded in our application. The output of the dialogs is collected and sent back to the unit. On the unit, there is a user interface that launches the scripts locally. It really is a superb solution - we don't need to know what firmware version the unit is, and we don't have to be backwards or forward compatible. The idea would be to point a browser at the unit and be able to operate the interface, a menu of dialogs, and run the selected dialog. To that end, we import qt, and qtui. We use signals and slots, and have a rich user interface with validation, run-time enable/disable and such. -Original Message- From: Phil Thompson [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 08, 2004 11:59 AM To: Hihn, Jason Cc: [EMAIL PROTECTED] Subject: Re: [PyKDE] ActiveX Does anyone know what it would take to get a QDialog to display in a browser via PyQt? I'm hoping there's a simple example somewhere. The ActiveX support, which will require SIP v4.2, is only for QAxWidget. In other words, it's to allow you to embed ActiveX controls in Qt applications and not the other way round. The reason for this is that some of the stuff is difficult to wrap and I need people who really want to use this stuff to identify exactly what needs wrapping to make it useful. So - can you tell me exactly which classes and methods need to be wrapped for you to do what you want? Phil __ This electronic message may contain proprietary and confidential information of Verint Systems Inc., its affiliates and/or subsidiaries. The information is intended to be for the use of the individual(s) or entity(ies) named above. If you are not the intended recipient (or authorized to receive this e-mail for the intended recipient), you may not use, copy, disclose or distribute to anyone this message or any information contained in this message. If you have received this electronic message in error, please notify us by replying to this e-mail. (1) ___ PyKDE mailing list[EMAIL PROTECTED] http://mats.imk.fraunhofer.de/mailman/listinfo/pykde
[PyKDE] Calling slots
I have a button that used to be connected to accept() on a dialog. I added some validation, and only want to call accept() now if the validation passes. I tried calling dlg.accept() but I got the message that it is not callable because it was not created in python. What is the work around? Thanks. __ This electronic message may contain proprietary and confidential information of Verint Systems Inc., its affiliates and/or subsidiaries. The information is intended to be for the use of the individual(s) or entity(ies) named above. If you are not the intended recipient (or authorized to receive this e-mail for the intended recipient), you may not use, copy, disclose or distribute to anyone this message or any information contained in this message. If you have received this electronic message in error, please notify us by replying to this e-mail. (1) ___ PyKDE mailing list[EMAIL PROTECTED] http://mats.imk.fraunhofer.de/mailman/listinfo/pykde
[PyKDE] Isuing a aprent qApp
Apparently, out look ate my last email so here it is again. I am using python embedded in an MFC app. The Python interp brings up QDialogs (from UI files, and coded in PyQt) This now works, and beautifully. There are 2 small issues that I need to address 1) The MFC app and the QDialog are sperate task bar entries. 2) The QDialog (even when set to modal in designer) is not modal, that is, the parent MFC app may be z-ordered in front if it. It think these issues will be fixed once I can make a QWinWidget that is the theApp.m_pmainFrame (or whatever it is called in MFC) but then the issue is how do I get the QDialogs parent set to that? The issue I see here is that the parent is outside the interpreter, and the needs to be sent inside. I also see qApp.mainWidget, but the issue remains the same. Once again, any help is appreciated. __ This electronic message may contain proprietary and confidential information of Verint Systems Inc., its affiliates and/or subsidiaries. The information is intended to be for the use of the individual(s) or entity(ies) named above. If you are not the intended recipient (or authorized to receive this e-mail for the intended recipient), you may not use, copy, disclose or distribute to anyone this message or any information contained in this message. If you have received this electronic message in error, please notify us by replying to this e-mail. (1) ___ PyKDE mailing list[EMAIL PROTECTED] http://mats.imk.fraunhofer.de/mailman/listinfo/pykde
[PyKDE] qApp issues
I have python embedded in my app, and I wish to use my applications window as the parent for some dialogs created (and coded) in python land. Is there a way to get the main widget in C++ to be the parent of Python? I need my python dialogs to: 1) Be modal w.r.t my app window, 2) Not show up in the task bar. I think setting the parent to my C++ window will fix these. Also if I can work around it, and disable the task bar entry and make the dialog always-on-top, that should work too, but wont be as elegant. As of right now, the from qt import * line makes a qApp of its own, in addition to my C++ qApp. Thanks! __ This electronic message may contain proprietary and confidential information of Verint Systems Inc., its affiliates and/or subsidiaries. The information is intended to be for the use of the individual(s) or entity(ies) named above. If you are not the intended recipient (or authorized to receive this e-mail for the intended recipient), you may not use, copy, disclose or distribute to anyone this message or any information contained in this message. If you have received this electronic message in error, please notify us by replying to this e-mail. (1) ___ PyKDE mailing list[EMAIL PROTECTED] http://mats.imk.fraunhofer.de/mailman/listinfo/pykde
[PyKDE] SIP/PyQT -u flag on Windows
It would be really nice if (at least on windows) that the u flag of configure.py produced final targets with _d appended to the name. My troubles on win32 were almost exclusively due to this. When Python is compiled for debugging, it looks as if it tries to load other modules built for debugging, so it actually tries to import qt_d instead of qt. I was only ever able to get it to work when everything was compiled without debug, and I think this was the main issue. This would also make it much easier for me to switch between the release and debug versions. __ This electronic message may contain proprietary and confidential information of Verint Systems Inc., its affiliates and/or subsidiaries. The information is intended to be for the use of the individual(s) or entity(ies) named above. If you are not the intended recipient (or authorized to receive this e-mail for the intended recipient), you may not use, copy, disclose or distribute to anyone this message or any information contained in this message. If you have received this electronic message in error, please notify us by replying to this e-mail. (1) ___ PyKDE mailing list[EMAIL PROTECTED] http://mats.imk.fraunhofer.de/mailman/listinfo/pykde
[PyKDE] Win32 success! Now SIP problems
I finally got win32 success. It is a tricky bit, but its easy in retrospect. Now my issue is that the SIP dll cant stand to be entered twice by the program. For instance : Loop: Py_Initialize() PyRun_SimpleString(Import qt) #imports SIP Py_Finalize() On the 2nd time around the program crashes in SIP Is there anyway SIP can be fixed, or can I forcibly unload it? __ This electronic message may contain proprietary and confidential information of Verint Systems Inc., its affiliates and/or subsidiaries. The information is intended to be for the use of the individual(s) or entity(ies) named above. If you are not the intended recipient (or authorized to receive this e-mail for the intended recipient), you may not use, copy, disclose or distribute to anyone this message or any information contained in this message. If you have received this electronic message in error, please notify us by replying to this e-mail. (1) ___ PyKDE mailing list[EMAIL PROTECTED] http://mats.imk.fraunhofer.de/mailman/listinfo/pykde
[PyKDE] Windows not working when embedded.
Ok, I gave up on the idea of making monolithic binary. So I have everything compiled and installed as usual. I can doubple click the script, and it works as it should. I embedded python into my app. Python works. But when I try to run any pyqt code, nothing happens. The imports seem to work, (having debugged into python and such) but my app window does not come up. Heres my code: char statements[][80]={ import sys\n, sys.path.append('C:\\Python23\\Lib\\site-packages')\n, from qt import *\n, from qtui import *\n, a=QApplication(sys.argv)\n, a.connect(a, SIGNAL(\lastWindowClosed()\), a, SLOT(\quit()\))\n, x=QDialog()\n, x.show()\n, a.exec_loop()\n}; PyObject *err; for (int i=0; isizeof(statements)/80; i++){ PyRun_SimpleString(statements[i]); err=PyErr_Occurred(); if (err) PyErr_Print(); } At no time is PyErr_Print() reached. Yet nothing happens. Does anyone have an idea? Im trying to get a window fro python in a MSVC 6 app. Thanks! __ This electronic message may contain proprietary and confidential information of Verint Systems Inc., its affiliates and/or subsidiaries. The information is intended to be for the use of the individual(s) or entity(ies) named above. If you are not the intended recipient (or authorized to receive this e-mail for the intended recipient), you may not use, copy, disclose or distribute to anyone this message or any information contained in this message. If you have received this electronic message in error, please notify us by replying to this e-mail. (1) ___ PyKDE mailing list[EMAIL PROTECTED] http://mats.imk.fraunhofer.de/mailman/listinfo/pykde
[PyKDE] Windows app crashing on import
I have successfully integrated python into my windows app. There is a problem though. I cannot import qt or qtui, which I need. I dug deep into the import process and found it was only trying to import libsip_d.pyd. So I took libsip and renamed it, but now I get an assertion failure. Does anyone know what it takes to get these modules imported in debug mode? I also tried it in release mode. I didnt get an error, but it didnt work either. Thanks! __ This electronic message may contain proprietary and confidential information of Verint Systems Inc., its affiliates and/or subsidiaries. The information is intended to be for the use of the individual(s) or entity(ies) named above. If you are not the intended recipient (or authorized to receive this e-mail for the intended recipient), you may not use, copy, disclose or distribute to anyone this message or any information contained in this message. If you have received this electronic message in error, please notify us by replying to this e-mail. (1) ___ PyKDE mailing list[EMAIL PROTECTED] http://mats.imk.fraunhofer.de/mailman/listinfo/pykde
[PyKDE] Compilng into python under MSVC
The documentation is quite sparse, for both python and pyqt. Ive compiled python from the dsp files, sip, qt and pyqt, but now I am totally lost. Everything works, but I wish to hide the modules like in Unix. The lack of a python configure script is really confusing me. I dont think that Makefile.pre.in changes (PYUQT_LIBS, PYQT_OBJS) will work without configure. Not only that, but the config.c.in as well. Id _really_ appreciate it of someone could point me in the right direction. Thanks! __ This electronic message may contain proprietary and confidential information of Verint Systems Inc., its affiliates and/or subsidiaries. The information is intended to be for the use of the individual(s) or entity(ies) named above. If you are not the intended recipient (or authorized to receive this e-mail for the intended recipient), you may not use, copy, disclose or distribute to anyone this message or any information contained in this message. If you have received this electronic message in error, please notify us by replying to this e-mail. (1) ___ PyKDE mailing list[EMAIL PROTECTED] http://mats.imk.fraunhofer.de/mailman/listinfo/pykde
RE: [PyKDE] Buling PyQt into Python: Errors
I got it. The dynamic loader was trying to link to a Qt3.1 that was installed. Reconfiguring ld.so.conf fixed it. -Original Message- From: [EMAIL PROTECTED] [mailto:pykde- [EMAIL PROTECTED] On Behalf Of Hihn, Jason Sent: Thursday, October 21, 2004 10:50 AM To: Phil Thompson Cc: [EMAIL PROTECTED] Subject: RE: [PyKDE] Buling PyQt into Python: Errors PYQT_LIBS was adjusted, and PYQT_OBJS constructed as per the commands. Well objdump shows the symbol in the qt lib: 007ad698 wO .data 000c _ZTI13QSplashScreen I tried a different qt, but same results. I do have a python binary, but on launch it loads and immediately gives that error. I'm at a lost because as Objdump shows, its in there! -Original Message- From: Phil Thompson [mailto:[EMAIL PROTECTED] Sent: Thursday, October 21, 2004 9:31 AM To: Hihn, Jason Cc: [EMAIL PROTECTED] Subject: RE: [PyKDE] Buling PyQt into Python: Errors Ah, ok. I got it mostly working. I get errors on qtext and qtgl modules. I guess they weren't built by PyQt for some reason... Now I get one final error: case $MAKEFLAGS in \ *-s*) CC='gcc -pthread' LDSHARED='gcc -pthread -shared' OPT='-DNDEBUG -g -O3 -Wall -Wstrict-prototypes' ./python -E ./setup.py -q build;; \ *) CC='gcc -pthread' LDSHARED='gcc -pthread -shared' OPT='-DNDEBUG -g -O3 -Wall -Wstrict-prototypes' ./python -E ./setup.py build;; \ esac ./python: relocation error: ./python: undefined symbol: _ZTI13QSplashScreen make: *** [sharedmods] Error 127 I am compiling against Qt-x11-commercial-3.3.3 Any ideas? Assuming that the symbol is defined in your Qt shared library I would suspect that it's not finding the library itself. Remember - the PYQT_LIBS in the documentation is an example and may not be appropriate for your setup. Compare it with the PyQt Makefiles that are generated for your system to see if there are extra flags you need to specify. Phil __ This electronic message may contain proprietary and confidential information of Verint Systems Inc., its affiliates and/or subsidiaries. The information is intended to be for the use of the individual(s) or entity(ies) named above. If you are not the intended recipient (or authorized to receive this e-mail for the intended recipient), you may not use, copy, disclose or distribute to anyone this message or any information contained in this message. If you have received this electronic message in error, please notify us by replying to this e-mail. (1) ___ PyKDE mailing list[EMAIL PROTECTED] http://mats.imk.fraunhofer.de/mailman/listinfo/pykde __ This electronic message may contain proprietary and confidential information of Verint Systems Inc., its affiliates and/or subsidiaries. The information is intended to be for the use of the individual(s) or entity(ies) named above. If you are not the intended recipient (or authorized to receive this e-mail for the intended recipient), you may not use, copy, disclose or distribute to anyone this message or any information contained in this message. If you have received this electronic message in error, please notify us by replying to this e-mail. (1) ___ PyKDE mailing list[EMAIL PROTECTED] http://mats.imk.fraunhofer.de/mailman/listinfo/pykde
RE: [PyKDE] Buling PyQt into Python: Errors
Ah, ok. I got it mostly working. I get errors on qtext and qtgl modules. I guess they weren't built by PyQt for some reason... Now I get one final error: case $MAKEFLAGS in \ *-s*) CC='gcc -pthread' LDSHARED='gcc -pthread -shared' OPT='-DNDEBUG -g -O3 -Wall -Wstrict-prototypes' ./python -E ./setup.py -q build;; \ *) CC='gcc -pthread' LDSHARED='gcc -pthread -shared' OPT='-DNDEBUG -g -O3 -Wall -Wstrict-prototypes' ./python -E ./setup.py build;; \ esac ./python: relocation error: ./python: undefined symbol: _ZTI13QSplashScreen make: *** [sharedmods] Error 127 I am compiling against Qt-x11-commercial-3.3.3 Any ideas? -Original Message- From: Phil Thompson [mailto:[EMAIL PROTECTED] Sent: Thursday, October 21, 2004 3:17 AM To: Hihn, Jason Cc: Phil Thompson; [EMAIL PROTECTED] Subject: RE: [PyKDE] Buling PyQt into Python: Errors Yes, that worked! Now I just get them as unresolveds by the linker in the final step. I think this comes from confusion in the first part of Rebuilding Python. When it says: Edit Makefile.pre.in and add the macros PYQT_OBJS and PYQT_LIBS. PYQT_OBJS contains the path names of all the object files that werecreated when you built the static SIP and PyQt modules, ie. the outputs of ls siplib/*.o and ls qt*/*.o from the SIP and PyQt source directories respectively. PYQT_LIBS contains the command line flags needed to link the various Qt libraries. For example: PYQT_LIBS= -L/usr/local/qt/lib -lqscintilla -lqassistantclient -lqui - lqt-mt Where it says add the macros I am assuming that PYQT_OBJS and PYQT_LIBS are already defined and that I do not have to define them? But I don't see where they are specified. No, add the macros means define them. The standard Python configuration knows nothing about PyQt. Phil __ This electronic message may contain proprietary and confidential information of Verint Systems Inc., its affiliates and/or subsidiaries. The information is intended to be for the use of the individual(s) or entity(ies) named above. If you are not the intended recipient (or authorized to receive this e-mail for the intended recipient), you may not use, copy, disclose or distribute to anyone this message or any information contained in this message. If you have received this electronic message in error, please notify us by replying to this e-mail. (1) ___ PyKDE mailing list[EMAIL PROTECTED] http://mats.imk.fraunhofer.de/mailman/listinfo/pykde
RE: [PyKDE] Buling PyQt into Python: Errors
PYQT_LIBS was adjusted, and PYQT_OBJS constructed as per the commands. Well objdump shows the symbol in the qt lib: 007ad698 wO .data 000c _ZTI13QSplashScreen I tried a different qt, but same results. I do have a python binary, but on launch it loads and immediately gives that error. I'm at a lost because as Objdump shows, its in there! -Original Message- From: Phil Thompson [mailto:[EMAIL PROTECTED] Sent: Thursday, October 21, 2004 9:31 AM To: Hihn, Jason Cc: [EMAIL PROTECTED] Subject: RE: [PyKDE] Buling PyQt into Python: Errors Ah, ok. I got it mostly working. I get errors on qtext and qtgl modules. I guess they weren't built by PyQt for some reason... Now I get one final error: case $MAKEFLAGS in \ *-s*) CC='gcc -pthread' LDSHARED='gcc -pthread -shared' OPT='-DNDEBUG -g -O3 -Wall -Wstrict-prototypes' ./python -E ./setup.py -q build;; \ *) CC='gcc -pthread' LDSHARED='gcc -pthread -shared' OPT='-DNDEBUG -g -O3 -Wall -Wstrict-prototypes' ./python -E ./setup.py build;; \ esac ./python: relocation error: ./python: undefined symbol: _ZTI13QSplashScreen make: *** [sharedmods] Error 127 I am compiling against Qt-x11-commercial-3.3.3 Any ideas? Assuming that the symbol is defined in your Qt shared library I would suspect that it's not finding the library itself. Remember - the PYQT_LIBS in the documentation is an example and may not be appropriate for your setup. Compare it with the PyQt Makefiles that are generated for your system to see if there are extra flags you need to specify. Phil __ This electronic message may contain proprietary and confidential information of Verint Systems Inc., its affiliates and/or subsidiaries. The information is intended to be for the use of the individual(s) or entity(ies) named above. If you are not the intended recipient (or authorized to receive this e-mail for the intended recipient), you may not use, copy, disclose or distribute to anyone this message or any information contained in this message. If you have received this electronic message in error, please notify us by replying to this e-mail. (1) ___ PyKDE mailing list[EMAIL PROTECTED] http://mats.imk.fraunhofer.de/mailman/listinfo/pykde
RE: [PyKDE] Buling PyQt into Python: Errors
Yes, that worked! Now I just get them as unresolveds by the linker in the final step. I think this comes from confusion in the first part of Rebuilding Python. When it says: Edit Makefile.pre.in and add the macros PYQT_OBJS and PYQT_LIBS. PYQT_OBJS contains the path names of all the object files that werecreated when you built the static SIP and PyQt modules, ie. the outputs of ls siplib/*.o and ls qt*/*.o from the SIP and PyQt source directories respectively. PYQT_LIBS contains the command line flags needed to link the various Qt libraries. For example: PYQT_LIBS= -L/usr/local/qt/lib -lqscintilla -lqassistantclient -lqui - lqt-mt Where it says add the macros I am assuming that PYQT_OBJS and PYQT_LIBS are already defined and that I do not have to define them? But I don't see where they are specified. Thanks again! -Original Message- From: Phil Thompson [mailto:[EMAIL PROTECTED] Sent: Wednesday, October 20, 2004 11:14 AM To: Hihn, Jason Cc: [EMAIL PROTECTED] Subject: Re: [PyKDE] Buling PyQt into Python: Errors I got through to the re-building on python part, and during the make it complains that the functions in the config.c lines that were added (from config.c.in) are calling undefined functions: Modules/config.c:81: `initqtcanvas' undeclared here (not in a function) Modules/config.c:81: initializer element is not constant Modules/config.c:81: (near initialization for `_PyImport_Inittab[18].initfunc') Modules/config.c:81: initializer element is not constant Modules/config.c:81: (near initialization for `_PyImport_Inittab[18]') Modules/config.c:82: `initqtext' undeclared here (not in a function) Modules/config.c:82: initializer element is not constant Modules/config.c:82: (near initialization for `_PyImport_Inittab[19].initfunc') Modules/config.c:82: initializer element is not constant Modules/config.c:82: (near initialization for `_PyImport_Inittab[19]') Modules/config.c:83: `initqtgl' undeclared here (not in a function) Modules/config.c:83: initializer element is not constant Modules/config.c:83: (near initialization for `_PyImport_Inittab[20].initfunc') Modules/config.c:83: initializer element is not constant Modules/config.c:83: (near initialization for `_PyImport_Inittab[20]') Modules/config.c:84: `initqtnetwork' undeclared here (not in a function) Modules/config.c:84: initializer element is not constant Modules/config.c:84: (near initialization for `_PyImport_Inittab[21].initfunc') Modules/config.c:84: initializer element is not constant Modules/config.c:84: (near initialization for `_PyImport_Inittab[21]') Modules/config.c:85: `initqtsql' undeclared here (not in a function) Modules/config.c:85: initializer element is not constant Modules/config.c:85: (near initialization for `_PyImport_Inittab[22].initfunc') Modules/config.c:85: initializer element is not constant Modules/config.c:85: (near initialization for `_PyImport_Inittab[22]') Modules/config.c:86: `initqttable' undeclared here (not in a function) Modules/config.c:86: initializer element is not constant Modules/config.c:86: (near initialization for `_PyImport_Inittab[23].initfunc') Modules/config.c:86: initializer element is not constant Modules/config.c:86: (near initialization for `_PyImport_Inittab[23]') Modules/config.c:87: `initqtui' undeclared here (not in a function) Modules/config.c:87: initializer element is not constant Modules/config.c:87: (near initialization for `_PyImport_Inittab[24].initfunc') Modules/config.c:87: initializer element is not constant Modules/config.c:87: (near initialization for `_PyImport_Inittab[24]') Modules/config.c:88: `initqtxml' undeclared here (not in a function) Modules/config.c:88: initializer element is not constant Modules/config.c:88: (near initialization for `_PyImport_Inittab[25].initfunc') Modules/config.c:88: initializer element is not constant Modules/config.c:88: (near initialization for `_PyImport_Inittab[25]') Modules/config.c:91: initializer element is not constant Modules/config.c:91: (near initialization for `_PyImport_Inittab[26]') make: *** [Modules/config.o] Error 1 Can anyone enlighten me? Is there a step missing from the instructions (don't I need a #include?) There is definately a documentation bug. Try changing the function declarations to remove the trailing c from initqtcanvasc() etc. That should get it to compile. If it doesn't link then try putting the c back (everywhere, including where they were missing). I can't remember off the top of my head if the c should be there or not - you can check by looking at the generated code. Phil __ This electronic message may contain proprietary and confidential information
[PyKDE] setModal Not working.
I have a QDialog, and I try to do: Dlg.setModal(False) But it gives me an Attribute Error without any kind of explanation. Doing a dir() on it, I dont see a setModal, though it is in Qt. There is a isModal() though. Any help? Thanks __ This electronic message may contain proprietary and confidential information of Verint Systems Inc., its affiliates and/or subsidiaries. The information is intended to be for the use of the individual(s) or entity(ies) named above. If you are not the intended recipient (or authorized to receive this e-mail for the intended recipient), you may not use, copy, disclose or distribute to anyone this message or any information contained in this message. If you have received this electronic message in error, please notify us by replying to this e-mail. (1) ___ PyKDE mailing list[EMAIL PROTECTED] http://mats.imk.fraunhofer.de/mailman/listinfo/pykde
[PyKDE] Where do SBR files come fomr?
I am following the example in the manual for SIP. I sipped my .sip file, but all I get are a bunch of .h and a few .cpp files in the directory, and no errors or warnings. Then when I try to run the python script to generate the makefile, I get an error that I cant open mycontrol.sbr. What am I missing? __ This electronic message may contain proprietary and confidential information of Verint Systems Inc., its affiliates and/or subsidiaries. The information is intended to be for the use of the individual(s) or entity(ies) named above. If you are not the intended recipient (or authorized to receive this e-mail for the intended recipient), you may not use, copy, disclose or distribute to anyone this message or any information contained in this message. If you have received this electronic message in error, please notify us by replying to this e-mail. (1) ___ PyKDE mailing list[EMAIL PROTECTED] http://mats.imk.fraunhofer.de/mailman/listinfo/pykde
[PyKDE] Properties not implemented?
I have scripts that use Qt Properties (in KJSEmbed KJSEmbed magically handles properties) and it seems like they all need to be converted to the get/set methods. I just want to verify this before I go through and change a dozen scripts. Has anyone thought of a wrapper that overrides assignment to a property to call the get/set method? Thanks __ This electronic message may contain proprietary and confidential information of Verint Systems Inc., its affiliates and/or subsidiaries. The information is intended to be for the use of the individual(s) or entity(ies) named above. If you are not the intended recipient (or authorized to receive this e-mail for the intended recipient), you may not use, copy, disclose or distribute to anyone this message or any information contained in this message. If you have received this electronic message in error, please notify us by replying to this e-mail. (1) ___ PyKDE mailing list[EMAIL PROTECTED] http://mats.imk.fraunhofer.de/mailman/listinfo/pykde
[PyKDE] Confused on connects.
I have a simple python script that is below. How can I connect the Canceled function to the buttonCanceled button that is created in the UI file? Thanks in advance! #!/usr/bin/pythonfrom qt import *from qtui import *import sys,stringdef 'Canceled' (): print 'Canceled'a=QApplication(sys.argv)w=QWidgetFactory.create('network.ui')a.connect(a, SIGNAL(lastWindowClosed()), a, SLOT(quit()))Cancel=w.child('buttonCancel')# HOW DO I CONNECT THIS TO THE Canceled() ABOVE?a.connect(Cancel, SIGNAL(clicked()), a, SLOT('Canceled()')) # does not workw.show()a.exec_loop() __This electronic message may contain proprietary and confidential information of Verint Systems Inc., its affiliates and/or subsidiaries.The information is intended to be for the use of the individual(s) orentity(ies) named above. If you are not the intended recipient (or authorized to receive this e-mail for the intended recipient), you may not use, copy, disclose or distribute to anyone this message or any information contained in this message. If you have received this electronic message in error, please notify us by replying to this e-mail. (2)___ PyKDE mailing list[EMAIL PROTECTED] http://mats.imk.fraunhofer.de/mailman/listinfo/pykde
[PyKDE] Another Newbie Question
How do I get to get the control values of a UI-file created dialog. I have the dialog coming up, but that is it. Thanks __ This electronic message may contain proprietary and confidential information of Verint Systems Inc., its affiliates and/or subsidiaries. The information is intended to be for the use of the individual(s) or entity(ies) named above. If you are not the intended recipient (or authorized to receive this e-mail for the intended recipient), you may not use, copy, disclose or distribute to anyone this message or any information contained in this message. If you have received this electronic message in error, please notify us by replying to this e-mail. (1) ___ PyKDE mailing list[EMAIL PROTECTED] http://mats.imk.fraunhofer.de/mailman/listinfo/pykde
[PyKDE] Beginner Questions (coming from KJSEmbed)
Ive been trying to use KJSEmbed (the qt/kde/_javascript_ engine) but I am having maturity problems with it. I understand that PyQt is more mature? I am hoping someone can answer these basic questions: 1) Does it have an embeddable interpreter? Can we create an interpreter object in a C++ program, give it the code wither as string or a filename, and have it execute, and retrieve values of objects from the interpreter when the script is done? 2) Is it MSVC 6 or 7 compatible? Can it be compiled and linked in to an existing MFC program? 3) What are the size/execution speed costs, if known? 4) How are custom bindings to custom binary controls handled? (This is the biggest problem with KJSEmbed for me ATM) While we could script it, its just too slow. Id like an easy way to extend the interpreter to use a binary control. 5) Are there any glaring omissions in this technology? 6) Aside from the above, how does it compare and rank with KJSEmbed? Thanks! ___ PyKDE mailing list[EMAIL PROTECTED] http://mats.imk.fraunhofer.de/mailman/listinfo/pykde
RE: [PyKDE] Beginner Questions (coming from KJSEmbed)
Thanks for the great answers. RE: the 3MB Dll, does that include the python interpreter, or just the PyQt? Thanks again. -Original Message- From: [EMAIL PROTECTED] [mailto:pykde- [EMAIL PROTECTED] On Behalf Of Phil Thompson Sent: Wednesday, September 15, 2004 11:59 AM To: [EMAIL PROTECTED] Subject: Re: [PyKDE] Beginner Questions (coming from KJSEmbed) On Wednesday 15 September 2004 5:34 pm, Hihn, Jason wrote: I've been trying to use KJSEmbed (the qt/kde/javascript engine) but I am having maturity problems with it. I understand that PyQt is more mature? The first release was November 1998 for Qt v1.41. I am hoping someone can answer these basic questions: 1) Does it have an embeddable interpreter? Can we create an interpreter object in a C++ program, give it the code wither as string or a filename, and have it execute, and retrieve values of objects from the interpreter when the script is done? Yes. This is a function of Python rather than PyQt. 2) Is it MSVC 6 or 7 compatible? Can it be compiled and linked in to an existing MFC program? Yes. 3) What are the size/execution speed costs, if known? The bindings are very thin. The main PyQt module is a 3M DLL on Windows. Costs have never been measured because AFAIK they have never been an issue. 4) How are custom bindings to custom binary controls handled? (This is the biggest problem with KJSEmbed for me ATM) While we could script it, it's just too slow. I'd like an easy way to extend the interpreter to use a binary control. You generate your own extension module using SIP. Alternatively, ActiveX support is planned for the version after next. 5) Are there any glaring omissions in this technology? Not that I'm aware of. You can do 99% of what you can do in C++ in Python - but with fewer lines of code and much less programmer time. 6) Aside from the above, how does it compare and rank with KJSEmbed? Can't comment on that. Phil ___ PyKDE mailing list[EMAIL PROTECTED] http://mats.imk.fraunhofer.de/mailman/listinfo/pykde __ This electronic message may contain proprietary and confidential information of Verint Systems Inc., its affiliates and/or subsidiaries. The information is intended to be for the use of the individual(s) or entity(ies) named above. If you are not the intended recipient (or authorized to receive this e-mail for the intended recipient), you may not use, copy, disclose or distribute to anyone this message or any information contained in this message. If you have received this electronic message in error, please notify us by replying to this e-mail. (2) ___ PyKDE mailing list[EMAIL PROTECTED] http://mats.imk.fraunhofer.de/mailman/listinfo/pykde
RE: [PyKDE] Beginner Questions (coming from KJSEmbed)
Ok, I d/l it, and the first instruction is python configure.py To which I get: traceback info, line 32 in ? ImportError: no module named sipconfig Help? -Original Message- From: Phil Thompson [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 15, 2004 2:39 PM To: Hihn, Jason Cc: [EMAIL PROTECTED] Subject: Re: [PyKDE] Beginner Questions (coming from KJSEmbed) On Wednesday 15 September 2004 7:50 pm, Hihn, Jason wrote: Thanks for the great answers. RE: the 3MB Dll, does that include the python interpreter, or just the PyQt? The qt module. The Python interpreter is much smaller, as far as I can remember. Phil __ This electronic message may contain proprietary and confidential information of Verint Systems Inc., its affiliates and/or subsidiaries. The information is intended to be for the use of the individual(s) or entity(ies) named above. If you are not the intended recipient (or authorized to receive this e-mail for the intended recipient), you may not use, copy, disclose or distribute to anyone this message or any information contained in this message. If you have received this electronic message in error, please notify us by replying to this e-mail. (1) ___ PyKDE mailing list[EMAIL PROTECTED] http://mats.imk.fraunhofer.de/mailman/listinfo/pykde
RE: [PyKDE] Beginner Questions (coming from KJSEmbed)
Follow-up: While linux is stalled, I tried on windows. Why does it keep trying to import qtmt-230.dll on windows, when I want to use 3.2.1? -Original Message- From: [EMAIL PROTECTED] [mailto:pykde- [EMAIL PROTECTED] On Behalf Of Hihn, Jason Sent: Wednesday, September 15, 2004 2:47 PM To: Phil Thompson Cc: [EMAIL PROTECTED] Subject: RE: [PyKDE] Beginner Questions (coming from KJSEmbed) Ok, I d/l it, and the first instruction is python configure.py To which I get: traceback info, line 32 in ? ImportError: no module named sipconfig Help? -Original Message- From: Phil Thompson [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 15, 2004 2:39 PM To: Hihn, Jason Cc: [EMAIL PROTECTED] Subject: Re: [PyKDE] Beginner Questions (coming from KJSEmbed) On Wednesday 15 September 2004 7:50 pm, Hihn, Jason wrote: Thanks for the great answers. RE: the 3MB Dll, does that include the python interpreter, or just the PyQt? The qt module. The Python interpreter is much smaller, as far as I can remember. Phil __ This electronic message may contain proprietary and confidential information of Verint Systems Inc., its affiliates and/or subsidiaries. The information is intended to be for the use of the individual(s) or entity(ies) named above. If you are not the intended recipient (or authorized to receive this e-mail for the intended recipient), you may not use, copy, disclose or distribute to anyone this message or any information contained in this message. If you have received this electronic message in error, please notify us by replying to this e-mail. (1) ___ PyKDE mailing list[EMAIL PROTECTED] http://mats.imk.fraunhofer.de/mailman/listinfo/pykde __ This electronic message may contain proprietary and confidential information of Verint Systems Inc., its affiliates and/or subsidiaries. The information is intended to be for the use of the individual(s) or entity(ies) named above. If you are not the intended recipient (or authorized to receive this e-mail for the intended recipient), you may not use, copy, disclose or distribute to anyone this message or any information contained in this message. If you have received this electronic message in error, please notify us by replying to this e-mail. (1) ___ PyKDE mailing list[EMAIL PROTECTED] http://mats.imk.fraunhofer.de/mailman/listinfo/pykde