Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Qt Creator's Designer plugin “Go to slot" working fine only at first create code
Forum Updated to NodeBB v4.3 + New Features

Qt Creator's Designer plugin “Go to slot" working fine only at first create code

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
5 Posts 3 Posters 645 Views 2 Watching
  • 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.
  • SharedMemoryS Offline
    SharedMemoryS Offline
    SharedMemory
    wrote on last edited by SharedMemory
    #1

    Here is the code:

    mainwindow.h
    alt text
    mainwindow.cpp
    alt text

    When I press the "go to slot" button in the "Upload log" button right-click menu, I expect it to go to the code that it automatically connects to, but it doesn't work.
    alt text

    When I press the "go to slot" button in the "Run diagnostics" button right-click menu, I expect it automatically create the code and go to the code, it works fine. It auto create code and turn to the code file's line.
    alt text
    alt text

    But when i press it second time. It not working too like Upload log.

    I decided to come here to try my luck. This problem has troubled me for a long time, especially when I want to maintain some old code. I have done some searches on this problem, but it has not been solved.

    Qt creator version: 4.15.0 on windows
    Designer plugin version: 4.15.0

    1 Reply Last reply
    0
    • A Offline
      A Offline
      AhmedBedier
      wrote on last edited by
      #2

      I still has the same problem since Qt Creator 4.15, despite updating to the recent version of Qt Creator.

      have you found a solution?

      1 Reply Last reply
      0
      • Chris KawaC Offline
        Chris KawaC Offline
        Chris Kawa
        Lifetime Qt Champion
        wrote on last edited by
        #3

        It works as designed I think. It's more of a poor marketing problem really. This thing is an " automatic code generator that creates a method which name matches that needed for an autoconnect feature", but that would obviously be a terrible name, so they called it "go to slot". Maybe "create a slot" would be a better fit? Basically it only works once because you can't have two methods named the same and opening the generated code is not the center part of this feature. Creating it is.

        The whole autoconnect stuff is not a very good feature to be honest and I would discourage you from using it. I think it was created in the Delphi/Visual C++ popularity times to make Qt more familiar to the users of those tools, but it doesn't really fit.
        The designer is that way for at least a decade now and widgets are not really the center stage feature now, so I highly doubt anything will change here on its own.

        If you want that behavior to change you can always make a feature request on https://bugreports.qt.io/. I guess it shouldn't be that much work to modify it, but I don't know that code so can't say for sure.

        1 Reply Last reply
        3
        • SharedMemoryS Offline
          SharedMemoryS Offline
          SharedMemory
          wrote on last edited by
          #4
          This post is deleted!
          1 Reply Last reply
          0
          • SharedMemoryS Offline
            SharedMemoryS Offline
            SharedMemory
            wrote on last edited by
            #5

            I am very happy to see someone try to explain this problem, thank you very much Chris Kawa.

            @Chris-Kawa For this Issue. I used that feature about 3 years ago, maybe 5... I know that "go to slot" button do the same things like that describe, at least before. I agree with your suggestion, using automatic connection signal is not a good way. I will connect action manually in the future. thanks for your adviced.

            @AhmedBedier I have bad luck for that Issue. But I have good news for you. Currently I am using QtCreator 5.0.3 and designer plugin 5.0.3 on Ubuntu 1804. This problem did not occur on that platform and version I used. Hope this message is useful to you.

            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