Qt-interest Archive, March 2002
SIGNAL / SLOT problem
Message 1 in thread
I never had any trouble with this before, but all of a sudden one of my
QButton::clicked() signals is not getting through to the slot.
If anyone has debugged this stuff perhaps you can help...
The button is part of a group. All the other buttons work fine.
The behaviour is the same with Qt 3.02 on Windows, and with Qt 3.01 on
Windows, and on Linux
I've done a little debugging on Windows with Qt 3.01, since I happened to
have built the debug libraries:
During QObject::connectInternal() an connectionList is created (count=1) and
a connection is appended to the list (count=2)
This happens for all the buttons. The each have one slot connected.
When I click any of the buttons which do work, QButton::clicked() calls the
function QObject::activate_signal(4)
That function creates a connectionList with count=2, and the slot is called.
When I click the button which doesn't work, QButton::clicked() calls the
function QObject::activate_signal(4)
That function creates a connectionList, but this time count=1, and the slot
is not called.
I have also set breakpoints in QObject::disconnect(), but it isn't called
for this button.
--
[ signature omitted ]
Message 2 in thread
It had to be something simple...
Someone did something silly in Designer and we ended up with two buttons
with the same widget name, in the same place on the same screen, and the
"connected" one was under the other
Message 3 in thread
According to Volker, two widgets with the same name should be
"impossible" in Designer. It happened to me once too, I can dig out the
problem report. Trying to replicate the problem is devilishly
difficult. We had cut & paste difficulties, and some issues with
Designer "failing" are still unresolved. Shame, really.
Notice that if you cut & paste, you get "Parse error: ..." in the Debug
Output pane, which just worries me silly. Not that I ever run
Designer... ;-)
-- Paul.
> -----Original Message-----
> From: Paul Robertson [mailto:paul@jprassoc.demon.co.uk]
> Sent: 13 March 2002 15:39
> To: eh@poseidon.no
> Cc: qt-interest@trolltech.com
> Subject: Re: SIGNAL / SLOT problem
>
>
> It had to be something simple...
>
> Someone did something silly in Designer and we ended up with
> two buttons with the same widget name, in the same place on
> the same screen, and the "connected" one was under the other
>
> --
> List archive and information: http://qt-interest.trolltech.com
>