Several users are trying to make my KDevelop3+QtDesigner3 tutorial work for Qt4. Unfortunately, it is not possible to implement things the same way in Qt3 and in Qt4.
First of all, there is no KDE4 support in KDevelop yet (i.e. no template to start a project) and Qt4 support is very limited (for example Designer4 does not start within KDevelop).
Also, QtDesigner4 has had major changes from the 3 series and the most confusing thing for newbies is the absence of custom slots creation in Designer4. While the connection mechanism has been enhanced in Designer4, this is limited to existing signals and slots in Qt classes.
So what should you do when you want to connect a signal to a custom slot? First, you should read Using a component in your application in order to understand how to use your form in your project. The Single Inheritance Approach is quite easy to understand and will allow you to declare your custom slot, add the connection line and implement the slot in the subclass. The example in the doc is quite clear.
In addition to Qt amazing docs, a great tutorial for Qt4 can be found at The Qt 4 Resource Center.
Clarisse is having 10 feeds average per day so I hope this blog makes sense ;-) She is already opening her eyes and trying to get a glimpse of this world!
2 comments:
Hi
I am new to Qt programming. I hope someone can guide me to start me off.
First of all I have tried a few of the tutorials and presently I am exploring into building some basic applications.
I found that I need to create my own slot/signal functions. I wonder how can I create and import it into Qt 4 desinger.
Please advise.
Thanking you in advance.
Regards,
Alex
hi can u plz tell me how to connect custom slots . the tutorial link that u have given is not working saing that that the tutorial is has been removed and now only available as a book
thanks
farooq hasny
Post a Comment