On Thu, Jan 15, 2009 at 8:20 PM, Emanuel Rumpf <[email protected]> wrote: > I'm trying to connect > some actions for the AudioManagerDialog. > For example: > > connect( m_fileList, SIGNAL(itemSelectionChanged()), > this, SLOT(slotSelectionChanged(0)) ); > > > ....but slotSelectionChanged() doesn't get called. > > Am I missing something?
Two things, I think. First, the signal and slot have to have matching formal parameter lists. They don't have to be exactly the same -- for example, you can connect a signal with a QString parameter to a slot that expects a const QString & -- but they do have to be compatible. Here you're trying to connect a signal without arguments to a slot with one. Second, the text within SLOT() needs to match the formal spec of the function, in this case slotSelectionChanged(QTreeWidgetItem*). You can't put values or other C++ code in there. To make a connection like this work, you need to either add a slotSelectionChanged() with no arguments, or use a QSignalMapper to synthesise an argument based on the identity of the calling object. Chris ------------------------------------------------------------------------------ This SF.net email is sponsored by: SourcForge Community SourceForge wants to tell your story. http://p.sf.net/sfu/sf-spreadtheword _______________________________________________ Rosegarden-devel mailing list [email protected] - use the link below to unsubscribe https://lists.sourceforge.net/lists/listinfo/rosegarden-devel
