Hi,
I am very new to Qt and am finding problem in the very basics of the Signals and Slots.
How to we connect a button click signal with my own slot.
What i did was that with the help of QT Designer i made a page with 2 buttons and one lineEdit. Now the first button was connected to the MainWindow with the clicked signal and the close slot.
it read as:
connect(button,SIGNAL(clicked()),MainWindow,SLOT(c lose()));
now what i want is that when i click the second button then it should display me a line on the lineEdit.
For that i created a class called Action.h and declared a slot in there. Then i made an action.cpp and defined the slot there.
Now is the problem? How do i get this slot connected to the clicked() signal of the button. Where should I write the connect statement which would connect the click of the button to the desired user-defined slot.
Thanking you,
Kapil
Bookmarks