-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
Qt Creator 2.8.1, Qt Creator 3.0.0-rc1
-
None
-
Windows 8, 64 bit
Qt creator 2.8.1 (Based on Qt 4.8.4 (MSVC 2010, 32bit))
-
204cc21f0cc10fe268c1ab6b54e9916e8c98a316
If you have a class in the header of a UI file (i.e. MainWindow.h) and that class has a pointer to the Ui class then slots generated by the designer are put in that class in stead of the Ui class.
Consider this example:
header file:
namespace Ui { class MainWindow; } class MainWindow; class MyClass { public: MainWindow *mainWindow; }; class MainWindow { ... };
If you add an action to MainWindow and in the designer select 'goto slot... triggered', the method is added to MyClass and not MainWindow.
result header:
namespace Ui { class MainWindow; } class MainWindow; class MyClass { public: MainWindow *mainWindow; private slots: void on_actionTest_triggered(); //this actually should be in MainWindow }; class MainWindow { ... };