[Kde-bindings] Qyoto: Movable QDockWidgets

Arno Rehn arno at arnorehn.de
Wed Oct 18 20:50:18 UTC 2006


Am Mittwoch, 18. Oktober 2006 19:02 schrieb Richard Dale:
> On Wednesday 18 October 2006 17:31, Arno Rehn wrote:
> > Hi,
> >
> > I've just tried to convert some other examples from C++ to C# and
> > recognized that QDockWidgets are not movable. I've written this small
> > example:
> >
> > using Qyoto;
> >
> > class Window : QMainWindow {
> > 	public Window() : base() {
> > 		SetCentralWidget(new QTextEdit(this));
> >
> > 		QDockWidget dock = new QDockWidget(this);
> > 		dock.SetWidget(new QTextEdit(dock));
> > 		AddDockWidget(Qt.DockWidgetArea.LeftDockWidgetArea, dock);
> > 	}
> >
> > 	public static int Main(string[] args) {
> > 		new QApplication(args);
> > 		Window w = new Window();
> > 		w.Show();
> > 		return QApplication.Exec();
> > 	}
> > }
> >
> > Normally the QDockWidget should be movable. The same example in C++ works
> > as expected. Any ideas?
>
> Hmm, it doesn't work for me either. I tried it in QtRuby and that was fine,
> so it isn't something to do with the Smoke library. The only thing I can
> think is that events are being lost because Qt thinks an event handler is
> being overriden when it isn't. So perhaps the best thing is to try
> monitoring the overloaded virtual method callbacks to see if there is
> anything funny going on with them.
Uhm... - Ok, but how do we do that? What methods do we need to watch?
The other solution would be to code some ugly hack that creates the 
QMainWindow in libqyoto.so and sets the pointer to it in the 
C#-QMainWindow-instance. With "original-C++-QMainWindows" everything works.
But I don't know if this problem only affects mainwindows or also other 
classes.

-- 
Arno Rehn
arno at arnorehn.de



More information about the Kde-bindings mailing list