Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Using QDesigner Signal /Slot editor for real.
QtWS25 Last Chance

Using QDesigner Signal /Slot editor for real.

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 3 Posters 317 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Anonymous_Banned275
    wrote on last edited by
    #1

    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 ?**

    f0f64b65-3550-4bf7-b7ee-cc26dcd21c2b-image.png

    1 Reply Last reply
    0
    • mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi
      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.

      JonBJ 1 Reply Last reply
      1
      • mrjjM mrjj

        Hi
        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.

        JonBJ Offline
        JonBJ Offline
        JonB
        wrote on last edited by
        #3

        @mrjj
        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.

        1 Reply Last reply
        1
        • A Offline
          A Offline
          Anonymous_Banned275
          wrote on last edited by Anonymous_Banned275
          #4

          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 )

          EDIT
          This is what I found
          https://doc.qt.io/qt-5/designer-connection-mode.html

          MORE EDIT
          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.

          cf1d6402-6a0d-43dc-9080-a435b00f5cf0-image.png

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved