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

Qt-interest Archive, May 2007
Tool tips question


Message 1 in thread

Is there a way to globally turn tooltips on and off?  Or do I have to do 
this programatically for every widget that has tooltips?

I searched the docs and didn't find anything yet (could be that my 
search is flawed ;))

Thanks,
Susan


---

This communication contains confidential information. If you are not the intended recipient please return this email to the sender and delete it from your records.

Diese Nachricht enthält vertrauliche Informationen. Sollten Sie nicht der beabsichtigte Empfänger dieser E-mail sein, senden Sie bitte diese an den Absender zurück und löschen Sie die E-mail aus Ihrem System.

--
 [ signature omitted ] 

Message 2 in thread

Susan Macchia wrote:
> Is there a way to globally turn tooltips on and off?  Or do I have to do 
> this programatically for every widget that has tooltips?
> 
> I searched the docs and didn't find anything yet (could be that my 
> search is flawed ;))
> 
> Thanks,
> Susan
> 

I'm not aware of a function that can do it directly, but it should be as simple as doing:

foreach( QWidget *widget, QApplication::allWidgets() )
	widget->setToolTip("");


--st

Attachment:

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature


Message 3 in thread

On Thursday 24 May 2007 12:24:24 pm Stathis wrote:
> Susan Macchia wrote:
> > Is there a way to globally turn tooltips on and off?  Or do I have to do
> > this programatically for every widget that has tooltips?
> >
> > I searched the docs and didn't find anything yet (could be that my
> > search is flawed ;))
> >
> > Thanks,
> > Susan
>

Here's one way to do it.
- Clint

pqToolTipTrapper::pqToolTipTrapper()
{
  QCoreApplication::instance()->installEventFilter(this);
}

pqToolTipTrapper::~pqToolTipTrapper()
{
  QCoreApplication::instance()->removeEventFilter(this);
}

bool pqToolTipTrapper::eventFilter(QObject* /*watched*/, QEvent* input_event)
{
  if(input_event->type() == QEvent::ToolTip)
    return true;
  return false;
}

--
 [ signature omitted ] 

Message 4 in thread

cool thanks :)

Is pqToolTipTrapper a singleton derived from QObject?

clinton@xxxxxxxxxxxx wrote:
> On Thursday 24 May 2007 12:24:24 pm Stathis wrote:
>   
>> Susan Macchia wrote:
>>     
>>> Is there a way to globally turn tooltips on and off?  Or do I have to do
>>> this programatically for every widget that has tooltips?
>>>
>>> I searched the docs and didn't find anything yet (could be that my
>>> search is flawed ;))
>>>
>>> Thanks,
>>> Susan
>>>       
>
> Here's one way to do it.
> - Clint
>
> pqToolTipTrapper::pqToolTipTrapper()
> {
>   QCoreApplication::instance()->installEventFilter(this);
> }
>
> pqToolTipTrapper::~pqToolTipTrapper()
> {
>   QCoreApplication::instance()->removeEventFilter(this);
> }
>
> bool pqToolTipTrapper::eventFilter(QObject* /*watched*/, QEvent* input_event)
> {
>   if(input_event->type() == QEvent::ToolTip)
>     return true;
>   return false;
> }
>
> --
> 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/
>
>
>   



---

This communication contains confidential information. If you are not the intended recipient please return this email to the sender and delete it from your records.

Diese Nachricht enthält vertrauliche Informationen. Sollten Sie nicht der beabsichtigte Empfänger dieser E-mail sein, senden Sie bitte diese an den Absender zurück und löschen Sie die E-mail aus Ihrem System.


Message 5 in thread

It is derived from QObject.  Tooltips are disabled during its lifetime.
Clint

On Thursday 24 May 2007 12:30:50 pm Susan Macchia wrote:
> cool thanks :)
>
> Is pqToolTipTrapper a singleton derived from QObject?
>
> clinton@xxxxxxxxxxxx wrote:
> > On Thursday 24 May 2007 12:24:24 pm Stathis wrote:
> >> Susan Macchia wrote:
> >>> Is there a way to globally turn tooltips on and off?  Or do I have to
> >>> do this programatically for every widget that has tooltips?
> >>>
> >>> I searched the docs and didn't find anything yet (could be that my
> >>> search is flawed ;))
> >>>
> >>> Thanks,
> >>> Susan
> >
> > Here's one way to do it.
> > - Clint
> >
> > pqToolTipTrapper::pqToolTipTrapper()
> > {
> >   QCoreApplication::instance()->installEventFilter(this);
> > }
> >
> > pqToolTipTrapper::~pqToolTipTrapper()
> > {
> >   QCoreApplication::instance()->removeEventFilter(this);
> > }
> >
> > bool pqToolTipTrapper::eventFilter(QObject* /*watched*/, QEvent*
> > input_event) {
> >   if(input_event->type() == QEvent::ToolTip)
> >     return true;
> >   return false;
> > }
> >
> > --
> > 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/
>
> ---
>
> This communication contains confidential information. If you are not the
> intended recipient please return this email to the sender and delete it
> from your records.
>
> Diese Nachricht enthält vertrauliche Informationen. Sollten Sie nicht der
> beabsichtigte Empfänger dieser E-mail sein, senden Sie bitte diese an den
> Absender zurück und löschen Sie die E-mail aus Ihrem System.


--
 [ signature omitted ]