Can't add reference to qt4dotnetlib.dll

5 views
Skip to first unread message

Stefan Monov

unread,
Sep 17, 2010, 3:51:13 AM9/17/10
to qt4d...@googlegroups.com
Ok, I've been using qt4dotnet since July and always used the old-skool
type-unsafe jambi syntax:
button.clicked.connect(this, "ButtonClicked()");
Just today I realized that your newest release adds support for true
.NET events, used like:
button.OnMousePressEvent += (button, mouseEvent) =>
Console.WriteLine(mouseEvent.x());
Well, yay! This fixes my top qt4dotnet annoyance.
So I tried to use it. Apparently it requires adding a reference to a
new dll, called "qt4dotnetlib.dll". I copied that file to my bin dir
and added it as a reference, but it appears with a yellow "!" icon in
the Solution Explorer. And when I build my project, I get "The type or
namespace name 'qt4dotnet' could not be found".

This occurs with the included example project as well.

What am I doing wrong?

Thanks,
Stefan

Stefan Monov

unread,
Sep 17, 2010, 4:38:38 AM9/17/10
to qt4d...@googlegroups.com
Managed to get it working. I had to recompile the qt4dotnetlib project
and use the resulting DLL (do you know why?)

I have a bugreport too. The design you guys used for mapping signals
to events is flawed.
Example code:

// polymorphism works fine in the old API:
com.trolltech.qt.gui.QWidget test = new com.trolltech.qt.gui.QPushButton();
// however, it fails with the new API, due to the abuse of inheritance:
qt4dotnet.QWidget a = new qt4dotnet.QPushButton(); // error!

What do you think?

David Canar

unread,
Sep 17, 2010, 7:16:51 PM9/17/10
to qt4d...@googlegroups.com
The qt4dotnetlib is just a proof of concept. We are still testing and searching for the best solution to add events to qtjambi. I´ll take on account the problem you just found.
The current qt4dotnetlib API most likely will change so it shouldnt be used in any project.
 
Thanks,
 
David


--
You received this message because you are subscribed to the Google Groups "qt4dotnet" group.
To post to this group, send email to qt4d...@googlegroups.com.
To unsubscribe from this group, send email to qt4dotnet+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/qt4dotnet?hl=en.


Reply all
Reply to author
Forward
0 new messages