Using QDesigner Signal /Slot editor for real.
AnneRanch last edited by
OK, I am capable to navigate thru the GUI feature - I can bypass the "connect" both new and old methods.
I can assign object and its SIGNAL ( button -> clicked ) using GUI , then I can assign SLOT ( button-> hide ) action.
That works as expected , button disappears (!) , but
I need a REAL SLOT function such as output message to another text widget.
**How do I add my REAL slot function (output message to another text widget ) so it is a part of the "pull down combo box" in QDesigner ?
I have one defined in code, how do I option QDesiger to be able to use it ?**
As far as I know, it can only show the predefined Qt ones.
You cannot make it see a custom slot that you make it code.
JonB last edited by
In the slot panel add a new slot (green cross). The text slot1() appears. Double click on it to edit the line and write instead the name of your function doit_when_yes_ispressed(). Accept.
You cannot edit the code of a slot, only its name.
AnneRanch last edited by AnneRanch
Let's back-up a little.
As far as I know there is no "how to " use QDesiger GUI to add SIGNAL/SLOT.
( If there is , let's share the link )
This is what I found
Perhaps the "defaults" values proves here expressed opinion in other way - the QDesigner SIGNAL/SLOT can be used ONLY in current object / form.
Some of the "defaults" have no visible / reasonable explanation - for example SLOT "object" "set text" does what ?
IMHO there are way to many needs to "try it and see" because of lack of ON LINE help AKA lack of "Tool tips".
The "SIGNAL / SLOT " view even lacks title.
END OF EDIT ( for now)
Having access only to "default" items does not surprise me , but that is no object of this.
Yes, you start with clicking the green plus mark ( I would hesitate to call it cross - its function is to add) - I guess Qt never heard of "tool tip" to guide the user.
Next you get a modified title bar of the window. All highlighted in blue.
The obscure down arrow at the end of Sender , next to Signal let you move the whole line down . ( One can guess what it does....or just try it - no tool-tip )
Double clicking on each item gives a pull- down combo box where default selections can be made .
From experience - this has to be done "left to right " since even default values are dependent.
With that said - please clarify the following . I am assuming you are talking about SLOT which is the last item to choose - and the "custom not only default sloot " is what I am after in above described sequence. As far as I can tell - the SLOT combo box will not process a keyboard - when matched it will select the item by first character entered.
( most combo boxes do that )
The text slot1() appears. Double click on it to edit the line and write instead the name of your function doit_when_yes_ispressed(). Accept.