0

RV Qt Custom Widget event override

Hi,

I am trying to create a custom QDockWidget in Mu, to override to closeEvent, so that the Widget doesn't close when clicking the X but is hidden.

So far, I've been able to create a MyDockWidget that inherits from QDockWidget and is correctly instantiated.

But as soon as I try to override the closeEvent, this makes RV to segfault...

Here's what I have so far:

class: MyDockWidget : QDockWidget
{
method: MyDockWidget ( MyDockWidget; string title , QWidget parent , int flags )
{
QDockWidget.QDockWidget( this , title , parent , flags );
}

method: closeEvent( void ; MyDockWidget this , qt.QEvent event )
{
event.ignore();
// qt.QDockWidget.closeEvent( this , event );
}
}

It segfaults whatever I put in the closeEvent, an event.ignore(), the call to the QDockWidget.closeEvent, nothing, a print...

Do you have any idea how to make it work?

Thanks in advance 

 

0件のコメント

ログインしてコメントを残してください。