[Qt-interest] QDockWidget Crashing

Neel Basu neel.basu.z at gmail.com
Mon Apr 20 13:52:36 CEST 2009


I am making a custom QDockWidget.
But when I show() it it crashes

---------------------------------
class FolderPane : public QDockWidget{
	Q_OBJECT
	Q_DISABLE_COPY(FolderPane)
	public:
		explicit FolderPane(QWidget* parent = 0);
		~FolderPane();
	private:
		Ui::FolderDock* m_ui;
	public:
};
------------------------------------------------
FolderPane::FolderPane(QWidget* parent):QDockWidget(parent), m_ui(new 
Ui::FolderDock){
	m_ui->setupUi(this);
}

FolderPane::~FolderPane(){
	delete m_ui;
}
----------------------------------------------------
In main() I am doing
---------------------------------------------------
QDockWidget* d = new FolderPane;
d->show();
--------------------------------------------------
This Crashes with the following Back trace


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
(gdb) bt
bt
#0  0xb78cf137 in QWidget::layout () from /usr/lib/libQtGui.so.4
#1  0xb7c02233 in QDockWidget::setFloating () from /usr/lib/libQtGui.so.4
#2  0x0804f26a in Ui_FolderDock::setupUi (this=0x8475e00, 
FolderDock=0x847f170) at ui_leftDock.h:64
#3  0x0804e598 in FolderPane (this=0x847f170, parent=0x0) at folderpane.cpp:5
#4  0x0804c2e7 in main (argc=Cannot access memory at address 0x1c
) at main.cpp:13
^done
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Thanks



More information about the Qt-interest-old mailing list