[Qt-interest] Adding PyQt QDockWidget to Qt's QMainWindow
Chitturi, Devendra_NagaKumar
Devendra.NagaKumar.Chitturi at deshaw.com
Mon Nov 28 08:22:27 CET 2011
Hi,
Our requirement is to add a PyQt QDockWidget to a cpp Qt's QMainWindow. We were able to do that by getting the cpp QMainWindow's instance in PyQt and making that parent to the PyQt's QDockWidget. But, in below cases it crashes.
1. Sometimes it crashes when re-docking the PyQt QDockWidget to a cpp's QMainWindow, which was undocked from the same cpp's QMainWindow.
Backtrace:
0 QtGui 0x000000010d989b53 QDockAreaLayoutInfo::indexOf(QWidget*) const + 163
1 QtGui 0x000000010d989b30 QDockAreaLayoutInfo::indexOf(QWidget*) const + 128
2 QtGui 0x000000010d989cba QDockAreaLayout::indexOf(QWidget*) const + 74
3 QtGui 0x000000010d9b39ce QMainWindowLayoutState::indexOf(QWidget*) const + 366
4 QtGui 0x000000010d9b4025 QMainWindowLayout::plug(QLayoutItem*) + 165
5 QtGui 0x000000010d979103 QDockWidgetPrivate::endDrag(bool) + 339
6 QtGui 0x000000010d97aef5 QDockWidgetPrivate::nonClientAreaMouseEvent(QMouseEvent*) + 293
7 QtGui 0x000000010d97b46b QDockWidget::event(QEvent*) + 907
8 QtGui.so 0x0000000128eefe5b sipQDockWidget::event(QEvent*) + 123
9 QtGui 0x000000010d5bbd9d QApplicationPrivate::notify_helper(QObject*, QEvent*) + 189
10 QtGui 0x000000010d5c1bfd QApplication::notify(QObject*, QEvent*) + 349
11 QtCore 0x0000000108e865fc QCoreApplication::notifyInternal(QObject*, QEvent*) + 124
2. It crashes consistently when undocking the PyQt QDockWidget by holding its title area and moving it (When it was docked to a cpp's QMainWindow).
Backtrace:
0 QtGui 0x000000010d9ad466 fixToolBarOrientation(QLayoutItem*, int) + 22
1 QtGui 0x000000010d9b3ee5 QMainWindowLayout::unplug(QWidget*) + 1077
2 QtGui 0x000000010d978952 QDockWidgetPrivate::startDrag() + 130
3 QtGui 0x000000010d97937c QDockWidgetPrivate::mouseMoveEvent(QMouseEvent*) + 396
4 QtGui 0x000000010d97b4b5 QDockWidget::event(QEvent*) + 981
5 QtGui.so 0x00000001287b3e5b sipQDockWidget::event(QEvent*) + 123
6 QtGui 0x000000010d5bbd9d QApplicationPrivate::notify_helper(QObject*, QEvent*) + 189
7 QtGui 0x000000010d5c3900 QApplication::notify(QObject*, QEvent*) + 7776
8 QtCore 0x0000000108e865fc QCoreApplication::notifyInternal(QObject*, QEvent*) + 124
Any suggestion or workaround to fix these issues would be much appreciated.
- Devendra
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20111128/84e9a780/attachment.html
More information about the Qt-interest-old
mailing list