[Qt-creator] Signal and sloteditor is not available in the betaversion
Daniel Molkentin
daniel.molkentin at nokia.com
Thu Jan 29 19:13:39 CET 2009
ext A B schrieb:
> >> A few days ago I downloaded the beta version, but I can not find the
> >> signal and slot editor when I'm editing a ui file with the
> >> "integrated" designer, the one where I press the "+" sign to add a new
> >> connection and then select sender, signal, receiver and finaly select
> >> the slot.
> >> It works fine in the ordinary designer.
> >
> > It wasn't present in the alpha preview either; I think it may have been
> > intentionally removed.
> >
> > /s/ Adam
>
> I hope they put it back in.
Did you try hitting F4? this switches to the interactive signal/slot
editor. The editor-widget was always just convinience, and it adds quite
a lot of clutter (not sure there were other reasons to keep it up).
You can simple drag the widget you want to connect to get a visual
connection hint (line). Drop that line on the widget you want to connect
to and a dialog will open where you can set the respective signals and
slots. This is imho a lot more intuitive.
> Right now I'm having serious problem getting an item under the file
> menu to be connected to closing the whole application.
Look at the code generated by uic (yourclass_ui.h). This shows you all
the actions that are generated by designer. In your case, there is no
alternative to that anyway, since designer has no concept of a
QApplication, it only works in the scope of the dialog or widget you are
editing, but you want to connect to a slot in the global QApplication
Object (which you can reference via the global qApp pointer if you
include the QApplication header).
Assuming you created an action called 'yourQuitAction': Simply edit the
dialogs Constructor in the implementation. Then you can simply usa a
"connect()" statement to wire ui.yourQuitAction (or
ui->yourQuitAction)which you can simple connect to qApp's
closeAllWindows() slot.
These are Qt basics however, better ask them on a pure Qt list or read
the (excellent) online docs. This list is dedicated to Creator development.
Cheers,
Daniel
--
Daniel Molkentin, Software Engineer,
Nokia Qt Software, www.qtsoftware.com
Rudower Chaussee 13, DE-12489 Berlin
More information about the Qt-creator-old
mailing list