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 slot location
Forum Updated to NodeBB v4.3 + New Features

Qt Creator slot location

Scheduled Pinned Locked Moved Qt Creator and other tools
2 Posts 2 Posters 1.3k 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.
  • R Offline
    R Offline
    robvr
    wrote on last edited by
    #1

    I created a new QT application using creator, and put a bunch of widgets on the mainwindow form. If I right-clicked, say, a button, and selected 'go to slot', creator would very helpfully add the declaration of the slot to mainwindow.h, and an empty slot function in mainwindow.cpp. Excellent, just what I want.
    Then, things turned strange...
    I added a number of source files to the project (.h and .cpp). After that, when I used 'got to slot', the automatically generated declaration and stub function ended up in one of these new files, instead of mainwindow. This continued for a while, during which time more sources were added, and then, quite unpredictably, creator switched it's target again when I added yet more source files.
    Funnier yet, when I added more forms, 'go to slot' on any of those correctly ended up in the corresponding source files (so far, they may start wandering around at any time..)

    I find that I have no control whatsoever over which source files the slots will end up in. Has anyone else run into this? Does anyone here know how to control where the slots to end up?

    Thanks

    Rob

    1 Reply Last reply
    0
    • C Offline
      C Offline
      ChasersDoom
      wrote on last edited by
      #2

      I just experienced a very similar issue where I click 'Go to slot' on a button in a form, but the slot appears in the mainwindow.cpp/h files.

      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