PDA

View Full Version : Using qt (designer) and visual studio add in



paul23
7th February 2012, 14:09
Hi there,

I installed the visual studio add in (for 2010). And I am creating a template just fine.

However I'm wondering "what now"? I can click on the UI resource, and then open the designer, add a push button (just to try). However how am I going to access this button from within the rest of my program?

How do I create "events" for items? - Is there a tutorial showing this?

KillGabio
7th February 2012, 15:02
All the things you create with the designer are incluided in the ui variable of your Widget/MainWindow/Dialog or whatever you have created. You can access a label for example by typing something like:

this->ui->label->text ()

At the designer you can right click an object, click go to slot.. and there you can have the events. Otherwise you will have to create them manually by: connect (...);

I recommend you to watch the tutorials of this guy: http://www.youtube.com/playlist?list=PL2D1942A4688E9D63&feature=plcp

he`s pretty neat ;)