This bugs was fixed on GIT mainline, check details on:
http://bugs.openbossa.org/show_bug.cgi?id=378
You can make this work in current release just changing the order of
you call the base constructor.
class ExternalConsole(QWidget):
def __init__(self, parent):
QWidget.__init__(self, parent)
self.light_mode = False # << put this after base constructor call
BR
On Sat, Sep 25, 2010 at 6:44 PM, anatoly techtonik <[email protected]> wrote:
> This is a minimal example that causes crash with PySide 0.4.1
> If you comment line ''self.light_mode = False' - this won't happen.
> I do not remember any restriction that parent constructors must
> be called first in Python. Can anybody explain?
>
>
> from PySide.QtGui import QWidget, QApplication, QMainWindow
>
> class ExternalConsole(QWidget):
> def __init__(self, parent):
> self.light_mode = False
> QWidget.__init__(self, parent)
>
> class MainWindow(QMainWindow):
>
> def __init__(self):
> super(MainWindow, self).__init__()
> self.extconsole = ExternalConsole(self)
>
> app = QApplication([])
> main = MainWindow()
> print "impossible"
> main.show()
> app.exec_()
>
>
>
> --
> anatoly t.
>
>
>
> On Sat, Sep 25, 2010 at 11:07 PM, anatoly techtonik <[email protected]>
> wrote:
>> Hello,
>>
>> I am trying to port a big PyQt4 application to PySide, and I have face
>> many stacktraces, but now I've got a condition when PySide crashes
>> Python. Is this ok in PySide world? Shouldn't this condition be
>> intercepted and displayed as Python stacktrace? How can I quickly
>> debug why this happens?
>>
>> Problem signature:
>> Problem Event Name: APPCRASH
>> Application Name: python.exe
>> Application Version: 0.0.0.0
>> Application Timestamp: 4c73f7b6
>> Fault Module Name: pyside.dll
>> Fault Module Version: 0.0.0.0
>> Fault Module Timestamp: 4c8a4a67
>> Exception Code: c0000005
>> Exception Offset: 000075fc
>> OS Version: 6.0.6002.2.2.0.768.2
>> Locale ID: 1033
>> Additional Information 1: 6b10
>> Additional Information 2: f4cb88429c2d2426938798bc8ad92e70
>> Additional Information 3: b088
>> Additional Information 4: 1bc51873acf931b0d4f41c4bc4fa2232
>>
>> --
>> anatoly t.
>> _______________________________________________
>> PySide mailing list
>> [email protected]
>> http://lists.openbossa.org/listinfo/pyside
>>
> _______________________________________________
> PySide mailing list
> [email protected]
> http://lists.openbossa.org/listinfo/pyside
>
--
Renato Araujo Oliveira Filho
Instituto Nokia de Tecnologia - INdT
Mobile: +55 (81) 8704-2144
_______________________________________________
PySide mailing list
[email protected]
http://lists.openbossa.org/listinfo/pyside