On 6 April 2011 00:13, Thomas Ehrnhoefer <[email protected]>wrote:
> I actually had a ui_[classname].h in my project folder. removing that fixed > that out-of-sync issue > > the "go to slot" functionality still fails to work though > > > On Tue, Apr 5, 2011 at 2:55 PM, Thomas Ehrnhoefer < > [email protected]> wrote: > >> Hi >> >> I have a QWidget extension which I created using the "Add New" wizard >> workflow. I created my simple UI using the designer, so far so good. >> But now I wanted to add another button, and that button does not appear in >> my ui object. Looking at the Ui_ class, it just not appears as a member >> there, but it is in the form XML. The designer itself displays the button as >> well. >> >> Seems like whatever triggers the code generation does not work. Also I >> could never do the "got to slot..." thing either, always complained that the >> "class definition of Ui::... could not be found. >> >> I created a new empty project and a widget using the wizard there, to see >> if I can spot any difference, but I could not. >> >> Any idea what can be wrong here? >> >> Thanks >> Thomas >> >> -- >> Thomas Ehrnhoefer >> Software Developer, http://tasktop.com >> > > -- > Thomas Ehrnhoefer > Software Developer, http://tasktop.com > > _______________________________________________ > Qt-creator mailing list > [email protected] > http://lists.qt.nokia.com/mailman/listinfo/qt-creator > > Hello Thomas, Generation of ui_myclass.cpp file happens only during build process. When you click on a component in designer, and select Go to slot... it will search for magic slot name. For example you have a checkbox named mycheck and selected to go to stateChanged(int) slot, QtCreator will search for method void MyClass::on_mycheck_stateChanged(int ) { } If such method does not exist, it will be created. Please note that 'magic' slots are implicitly connected with corresponding component signal. 'Go to slot' works properly even when you have no ui_myclass.cpp generated. So this works properly with QtCreator 2.1.0 on my side. P.S. Are you going to implement mylyn for QtCreator? I vote for the feature! and looking forward :) -- Gregory Smirnov Software Engineer 2X Software - http://www.2x.com Developers of virtual computing software 2X VirtualDesktopServer – 2X ApplicationServer – 2X LoadBalancer - 2X ThinClientServer
_______________________________________________ Qt-creator mailing list [email protected] http://lists.qt.nokia.com/mailman/listinfo/qt-creator
