Re: [PyQt] Connecting to base class signals in subclass
On 03/19/10 18:45, Demetrius Cassidy wrote: I am not sure if this is the intended behavior, but if I subclass a QWidget instance, and then try to connect to one of those signals in my subclass, I get a TypeError: class MyLabel(QtGui.QLabel): ... def __init__(self): ... self.linkActivated.connect(self._lnkActivated) ... ... def _lnkActivated(self, link): ... pass ... l = MyLabel() Traceback (most recent call last): File stdin, line 1, in module File stdin, line 3, in __init__ TypeError: pyqtSignal must be bound to a QObject, not 'MyLabel' Why can't I connect to my base class's signals in my subclass? You need to call the parent's init. super(QtGui.QLabel, self).__init__() ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Re: [PyQt] Delete a Laytou
I think it's best if you provide a stripped piece of code of what you've achieved so far and let the list take a look at it.. On Fri, Mar 19, 2010 at 10:17 PM, starglider develop starglider@gmail.com wrote: Hi Nick, I'm trying to make it work without luck, is there any python example? The example that is in *Rapid GUI Programming With Python and Qt* is only for stackedwidgets. Thank you. On 19 March 2010 10:38, Nick Gaens m...@nickgaens.com wrote: Take a look at a QStackedLayout.. You can add multiple widgets, each having their own layout, to it and set it as the central widget of your mainwindow. There's no need for deleting a layout and set a new one, since you alternate between the added widgets / layouts. Check out http://doc.trolltech.com/4.3/qstackedlayout.html#details to see a short example.. On Thu, Mar 18, 2010 at 11:39 PM, starglider develop starglider@gmail.com wrote: Hi, I have a QMainWindow with a main Vertical Layout and 3 HLayouts and several Widgets in every layout, but the program needs to remove all the layouts to create another one with a widget. How can I remove the original layouts? I was unable to find an answer in the internet. Thank you in advance for your help. Regards ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt -- Nick Gaens ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt -- Nick Gaens ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[PyQt] isSystemTrayAvailable() causes segfault
Hi. I am trying to use QtGui.QSystemTrayIcon.isSystemTrayAvailable(), but every time I run the methon I get a segfault. I'm using python 2.6.4 with pyqt 4.7.0. Has anybody had the same experience? ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Re: [PyQt] isSystemTrayAvailable() causes segfault
Works fine for me in Qt: 4.6.2, PyQt 4.7, Python: 2.6.4 On 03/20/10 10:01, Dino Krtanjek wrote: Hi. I am trying to use QtGui.QSystemTrayIcon.isSystemTrayAvailable(), but every time I run the methon I get a segfault. I'm using python 2.6.4 with pyqt 4.7.0. Has anybody had the same experience? ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Re: [PyQt] isSystemTrayAvailable() causes segfault
I just updated to python 2.6.5 and still no luck. My Qt version is also 4.6.2. Later I'll try to run it with the latest development snapshots of pyqt and update the thread. On Sat, Mar 20, 2010 at 6:20 PM, Russell Valentine r...@coldstonelabs.org wrote: Works fine for me in Qt: 4.6.2, PyQt 4.7, Python: 2.6.4 On 03/20/10 10:01, Dino Krtanjek wrote: Hi. I am trying to use QtGui.QSystemTrayIcon.isSystemTrayAvailable(), but every time I run the methon I get a segfault. I'm using python 2.6.4 with pyqt 4.7.0. Has anybody had the same experience? ___ PyQt mailing list p...@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt ___ PyQt mailing list p...@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[PyQt] Help - WINAPI PSoundW and WINAPI Beep linker error using sip
I am not sure what do I need to do to include the windows library into sip, so it links correctly. I am trying to use PlaySoundW and Beep which are defined in MMSystem.h in a class called PSound. It compiles fine in VC9.0, but gives me linker errors when I wrap it with sip. Generating Code... link /NOLOGO /DLL /MANIFEST /MANIFESTFILE:pyptlib.pyd.manifest /SUBSYSTE M:WINDOWS /MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Contr ols' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorA rchitecture='*' /INCREMENTAL:NO /OUT:pyptlib.pyd @C:\DOCUME~1\dcassidy\LOCALS~1 \Temp\nm1047.tmp Creating library pyptlib.lib and object pyptlib.exp sippyptlibPSoundChannel.obj : error LNK2019: unresolved external symbol public: virtual bool __thiscall PSoundChannel::PlaySoundW(class PSound const ,bool) ( ?playsou...@psoundchannel@@UAE_NABVPSound@@_...@z) referenced in function protect ed: virtual bool __thiscall sipPSoundChannel::PlaySoundW(class PSound const ,bo ol) (?playsou...@sippsoundchannel@@MAE_NABVPSound@@_...@z) sippyptlibPSound.obj : error LNK2019: unresolved external symbol public: static void __cdecl PSound::Beep(void) (?b...@psound@@SAXXZ) referenced in function _ meth_PSound_Beep pyptlib.pyd : fatal error LNK1120: 2 unresolved externals NMAKE : fatal error U1077: 'c:\Program Files\Microsoft Visual Studio 9.0\VC\BIN \link.EXE' : return code '0x460' Stop. -- View this message in context: http://old.nabble.com/Help---WINAPI-PSoundW-and-WINAPI-Beep-linker-error-using-sip-tp27966897p27966897.html Sent from the PyQt mailing list archive at Nabble.com. ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Re: [PyQt] Help - WINAPI PSoundW and WINAPI Beep linker error using sip
I found out I need to include winmm.lib, but I can't figure out how to force sip to include this. I tried adding /LIBPATH:C:\Program Files\Microsoft SDKs\Windows\v6.0A\Lib and including winmm.lib under LIBS of the makefile, but I still get the same linker errors. LIBS = /LIBPATH:$(PTLIBDIR)/lib /LIBPATH:C:\Program Files\Microsoft SDKs\Windows\v6.0A\Lib /LIBPATH:C:\iPhoneDev\h323lib\sip\qpy\QtCore\release /LIBPATH:C:\Python26\libs qpycore.lib ptlib.lib winmm.lib python26.lib Demetrius Cassidy wrote: I am not sure what do I need to do to include the windows library into sip, so it links correctly. I am trying to use PlaySoundW and Beep which are defined in MMSystem.h in a class called PSound. It compiles fine in VC9.0, but gives me linker errors when I wrap it with sip. Generating Code... link /NOLOGO /DLL /MANIFEST /MANIFESTFILE:pyptlib.pyd.manifest /SUBSYSTE M:WINDOWS /MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Contr ols' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorA rchitecture='*' /INCREMENTAL:NO /OUT:pyptlib.pyd @C:\DOCUME~1\dcassidy\LOCALS~1 \Temp\nm1047.tmp Creating library pyptlib.lib and object pyptlib.exp sippyptlibPSoundChannel.obj : error LNK2019: unresolved external symbol public: virtual bool __thiscall PSoundChannel::PlaySoundW(class PSound const ,bool) ( ?playsou...@psoundchannel@@UAE_NABVPSound@@_...@z) referenced in function protect ed: virtual bool __thiscall sipPSoundChannel::PlaySoundW(class PSound const ,bo ol) (?playsou...@sippsoundchannel@@MAE_NABVPSound@@_...@z) sippyptlibPSound.obj : error LNK2019: unresolved external symbol public: static void __cdecl PSound::Beep(void) (?b...@psound@@SAXXZ) referenced in function _ meth_PSound_Beep pyptlib.pyd : fatal error LNK1120: 2 unresolved externals NMAKE : fatal error U1077: 'c:\Program Files\Microsoft Visual Studio 9.0\VC\BIN \link.EXE' : return code '0x460' Stop. -- View this message in context: http://old.nabble.com/Help---WINAPI-PSoundW-and-WINAPI-Beep-linker-error-using-sip-tp27966897p27970324.html Sent from the PyQt mailing list archive at Nabble.com. ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt