Hot to set the tooltip of button
hi
I have one application that contains one MainWindow...MainWindow contains some dialog and some button on the dialog.....When i open any dialog from menu of this MainWindow..
it doesn't show tooltip of Button...
But when i use
DialogClass->show(); it shows the tooltip...But it here setModal(false) by default...
When i use DialogClass->setModal(true);
DialogClass->show(); Tooltip is not working while open the dialog...but when I click on this dialog ...tooltip is coming....I donot why this is happening...
I have to use tooltip features on this dialog and setModal(true) both simultaneously....
But on starting time means when i open the dialog tooltip is not coming...when i use setModal(true);....if m not using setModal(false) tooltip is coming...
please help me if anybody have idea
Re: Hot to set the tooltip of button
You know, you could simply use QDialog::exec() to trigger modal dialogs. I'm not 100% sure if this is the case, but you can enable tooltips for inactive windows like this:
Code:
dialog.setAttribute(Qt::WA_AlwaysShowToolTips);
Re: Hot to set the tooltip of button
Quote:
Originally Posted by
jpn
You know, you could simply use
QDialog::exec() to trigger modal dialogs. I'm not 100% sure if this is the case, but you can enable tooltips for inactive windows like this:
Code:
dialog.setAttribute(Qt::WA_AlwaysShowToolTips);
I m using Qt4.2.2...
I used this ..but it is not working...tooltip only comes whenver I click on this dialog...
when i use dialog.show(); tooltip is working......but when i use setModal(true)...
it appear only when click on the dialog....i used dialog.exec() it is not working also...
why this is happening help me....
Re: Hot to set the tooltip of button
Does this work for you?
Code:
#include <QtGui>
int main(int argc,char* argv[])
{
layout->addWidget(buttonBox);
return dialog.exec();
}
In case it does, could you modify the example so that it no more works?