Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 2

Qt-interest Archive, July 2007
Signals/Slots


Message 1 in thread

Hi,
I am using qt designer 3.3.8 along with kdevelop in fedora core 6 
environment.

*What I want to do :
I have a main window that contains a widget.  When I load a file from an 
action in this window, I would like to let the widget know that the file 
has changed.

*What I did:
I tried adding a signal in my main window through the tab Members in the 
object explorer of qt, the signal is called fileChanged(const QString 
&fileName). Then I link my signal to a function name load(const QString 
&fileName) in mycustomwidget. The signal is emitted when I load the 
file, in the function fileOpen of my class mainWindow_subclass created 
through the kdevelop  wizard which inherits from my mainWindow class.

*Results:
I thougt this would work but it does not. The program compiles 
correctly, but when I launch the application I get:

QObject::connect: No such signal mainWindow::fileChanged(const QString 
&fileName)
QObject::connect: sender name: mainWindow
QObject::connect: receiver name mycustomwidget

 and of course when I open the file, the signal is not intercepted.


Thanks,
Marie

--
 [ signature omitted ] 

Message 2 in thread

Call the signal

fileChanged( const QString & )

Get rid of the variable name when you are calling connect

Scott

> -----Original Message-----
> From: Marie-Christine Vallet [mailto:mmvallet@xxxxxxxxxxx]
> Sent: Wednesday, July 04, 2007 11:44 AM
> To: qt-interest@xxxxxxxxxxxxx
> Subject: Signals/Slots
> 
> Hi,
> I am using qt designer 3.3.8 along with kdevelop in fedora core 6
> environment.
> 
> *What I want to do :
> I have a main window that contains a widget.  When I load a file from
an
> action in this window, I would like to let the widget know that the
file
> has changed.
> 
> *What I did:
> I tried adding a signal in my main window through the tab Members in
the
> object explorer of qt, the signal is called fileChanged(const QString
> &fileName). Then I link my signal to a function name load(const
QString
> &fileName) in mycustomwidget. The signal is emitted when I load the
> file, in the function fileOpen of my class mainWindow_subclass created
> through the kdevelop  wizard which inherits from my mainWindow class.
> 
> *Results:
> I thougt this would work but it does not. The program compiles
> correctly, but when I launch the application I get:
> 
> QObject::connect: No such signal mainWindow::fileChanged(const QString
> &fileName)
> QObject::connect: sender name: mainWindow
> QObject::connect: receiver name mycustomwidget
> 
>  and of course when I open the file, the signal is not intercepted.
> 
> 
> Thanks,
> Marie
> 
> --
> To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx with
> "unsubscribe" in the subject or the body.
> List archive and information: http://lists.trolltech.com/qt-interest/

--
 [ signature omitted ] 

Message 3 in thread

It works now,

Thanks,

Marie

Scott Aron Bloom wrote:
> Call the signal
>
> fileChanged( const QString & )
>
> Get rid of the variable name when you are calling connect
>
> Scott
>
>   
>> -----Original Message-----
>> From: Marie-Christine Vallet [mailto:mmvallet@xxxxxxxxxxx]
>> Sent: Wednesday, July 04, 2007 11:44 AM
>> To: qt-interest@xxxxxxxxxxxxx
>> Subject: Signals/Slots
>>
>> Hi,
>> I am using qt designer 3.3.8 along with kdevelop in fedora core 6
>> environment.
>>
>> *What I want to do :
>> I have a main window that contains a widget.  When I load a file from
>>     
> an
>   
>> action in this window, I would like to let the widget know that the
>>     
> file
>   
>> has changed.
>>
>> *What I did:
>> I tried adding a signal in my main window through the tab Members in
>>     
> the
>   
>> object explorer of qt, the signal is called fileChanged(const QString
>> &fileName). Then I link my signal to a function name load(const
>>     
> QString
>   
>> &fileName) in mycustomwidget. The signal is emitted when I load the
>> file, in the function fileOpen of my class mainWindow_subclass created
>> through the kdevelop  wizard which inherits from my mainWindow class.
>>
>> *Results:
>> I thougt this would work but it does not. The program compiles
>> correctly, but when I launch the application I get:
>>
>> QObject::connect: No such signal mainWindow::fileChanged(const QString
>> &fileName)
>> QObject::connect: sender name: mainWindow
>> QObject::connect: receiver name mycustomwidget
>>
>>  and of course when I open the file, the signal is not intercepted.
>>
>>
>> Thanks,
>> Marie
>>
>> --
>> To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx with
>> "unsubscribe" in the subject or the body.
>> List archive and information: http://lists.trolltech.com/qt-interest/
>>     
>
> --
> To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx with "unsubscribe" in the subject or the body.
> List archive and information: http://lists.trolltech.com/qt-interest/
>
>
>   

--
 [ signature omitted ] 

Message 4 in thread

Hai,

I am using the version Qt3.3.4.

I am using the scrollbar in the application. I have to perform some task 
when the down arrow button in the scrollbar gets disabled.

Is there any method/signal that tells when the scrollbar down arrow is 
disabled?

Thanks for help

Regards
DP


DISCLAIMER

âThe information contained in this e-mail message and/or attachments to it may contain confidential or privileged information. If you are not the intended recipient, any dissemination, use, review, distribution, printing or copying of the information contained in this e-mail message and/or attachments to it are strictly prohibited. If you have received this communication in error, please notify us by reply e-mail or telephone and immediately and permanently delete the message and any attachments. Thank you"
--
 [ signature omitted ] 

Message 5 in thread

On 7/5/07, deepa <deepa@xxxxxxxxxx> wrote:
>
> Hai,
>
> I am using the version Qt3.3.4.
>
> I am using the scrollbar in the application. I have to perform some task
> when the down arrow button in the scrollbar gets disabled.
>
> Is there any method/signal that tells when the scrollbar down arrow is
> disabled?


You can connect to QScrollBar::valueChanged(int) and compare that value to
QScrollBar::maxValue(). I assume that the down button is disabled if and
only if the current value equals the maximum value.

Tom