Manually add signal and slot in qtcreator
It is convenient to use the signals and slots provided by qtcreator to manage a program with a UI, but some functions are not yet available, such:
1. The function name is fixed when you go to the slot editing
2. when editing signals and slots in the UI, you cannot find the slot you have added, and you are not sure what the qtcreator has done behind it. Although you know that the UI has UIC for compilation, but the code that should be presented in the Code is not displayed, for example:Two qtextedit, one textchanged (qstring), and the other settext (qstring). This is not reflected in the Code, nor in the header file generated by designer.
3. When adding a slot, I feel that there are too many steps
Environment:
Qtcreator2.6.1
Qt 4.8.3
Win7
Procedure:
1. Add singal and slot definitions to the header file.
2. Add the corresponding connect to the constructor. For example, add an action to a qaction.
Connect (ui-> actionbackground,
SIGNAL(triggered()),
this,
SLOT(actionBackGround_triggered()));
I think manual addition is advantageous. For example, to make the UI program more like a console program, the code is better read, and the management is more convenient, so that people can understand it.
Http://hakuyo.blog.51cto.com/6207832/1127551
Question:
Http://www.qtcn.org/bbs/read-htm-tid-57206.html
Questions about the signal slot