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. Missing Expected Behaviour in Qt Designer
Forum Updated to NodeBB v4.3 + New Features

Missing Expected Behaviour in Qt Designer

Scheduled Pinned Locked Moved General and Desktop
6 Posts 3 Posters 2.9k Views 1 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.
  • S Offline
    S Offline
    subin
    wrote on last edited by
    #1

    Hi All,

    I've just moved to Qt designer as an experiment. I've added a Qt form class to my empty project (as a QMainWindow) and added a QPushButton and a QLineEdit to the main form. In my QMainWindow class, I've added a public slot named setText() which does nothing but set the text inside QLineEdit object to some string. In the Qt designer, I've switched to signals/slots editing mode. Then I tried to connect the buttton's clicked() signal to my custom slot setText() - which is already defined in my MainWindow class. But strangely, I cannot see my slot listed there in the list!

    As I searched around on the web, I got "this video":http://www.youtube.com/watch?v=Ca8ItRtU0AA. But, in that video too, that guy adds his own slot into the list of slots manually typing in. I think it would be great if Qt designer updates the list of slots dynamically as the code changes. Also, please let me know if there is any workaround.

    Thanks

    1 Reply Last reply
    0
    • G Offline
      G Offline
      goetz
      wrote on last edited by
      #2

      Qt Designer does not know of your C++ implementation and therefore cannot know of your custom slot. This will not change.

      If you need that slot frequently in different projects, you should consider making a "Designer plugin":/doc/qt-4.7/designer-creating-custom-widgets.html from it.

      http://www.catb.org/~esr/faqs/smart-questions.html

      1 Reply Last reply
      0
      • S Offline
        S Offline
        subin
        wrote on last edited by
        #3

        Volker,
        I was not using Qt designer separately. I just used to Add ->Qt Form Class -> Design mode. So I was having an impression that, Qt creator collects all information about the project via the .pro file.

        Thank You

        1 Reply Last reply
        0
        • G Offline
          G Offline
          goetz
          wrote on last edited by
          #4

          The design component of Qt Creator is more or less just an embedded Qt Designer.

          http://www.catb.org/~esr/faqs/smart-questions.html

          1 Reply Last reply
          0
          • T Offline
            T Offline
            tobias.hunger
            wrote on last edited by
            #5

            Write a "feature request":http://bugreports.qt.nokia.com/ if you want this changed. We happily ignore requests made in the forum (mostly since we can not find them when planing;-).

            Of course a feature request is not guaranteed to get implemented either, but at least it will be noticed when developers consider what to do next.

            1 Reply Last reply
            0
            • S Offline
              S Offline
              subin
              wrote on last edited by
              #6

              Tobias,
              Ok, I'll be doing this immediately.
              Thanks

              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