qt designer:linking fuctions to actions?
First of all i apologize if i have posted this question in the wrong place. I am new to this forum.
I am an experienced coder but i am new to developing GUI's. I have found Qt designer to be a great resource for building a GUI, however i have become frustrated trying to implement some advanced functionality. I am new to the concept of signals and slots, where as i have successfully managed to connect a slider and a spin box to react to each other and i have manged to get a button click to close the program i have not found a way to run my own code on a button click event.
In specific, i have a button which when pressed i want a function i wrote myself to be called. This function sets up a web camera and starts to stream the camera data to a display.
My question is, how do i get a button click to run my function. I cannot seem to access the code behind my gui, i have also tried including my function in the main.ccp file which is loaded in QDevelop however i have not found a way to get Qt designer to access this function.
I have also stumbled across the idea of promoting a widget, it seems you can add your own class for a width and add functionality there, i am not sure if this is the correct method?
Any help would be appreciated. Even if you just direct me to somewhere i can find the information, i am not lazy just confused by new terminology, there is a high probabilty i have skimmed by the answer tens of times.
I am using Qdevelop 4.5 and developing on a linux distro
Re: qt designer:linking fuctions to actions?
Read about Using a Designer .ui File in Your Application. Once you create a proper widget subclass for your form, you can add connect() statements to the class that will connect the UI with login of the subclass.