mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
made help browser close on click
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@6637 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
dbb8e4980e
commit
c3af05b0bf
@ -9,6 +9,23 @@ MainPage::MainPage(QWidget *parent , Qt::WindowFlags flags ) : QWidget(parent, f
|
||||
help_browser = NULL ;
|
||||
}
|
||||
|
||||
class MyTextBrowser: public QTextBrowser
|
||||
{
|
||||
public:
|
||||
MyTextBrowser(QWidget *parent,QPushButton *bt)
|
||||
: QTextBrowser(parent),button(bt)
|
||||
{
|
||||
}
|
||||
|
||||
virtual void mousePressEvent ( QMouseEvent * e )
|
||||
{
|
||||
hide() ;
|
||||
button->setChecked(false) ;
|
||||
}
|
||||
|
||||
protected:
|
||||
QPushButton *button ;
|
||||
};
|
||||
|
||||
void MainPage::showHelp(bool b)
|
||||
{
|
||||
@ -27,7 +44,7 @@ void MainPage::registerHelpButton(QPushButton *button,const QString& help_html_t
|
||||
{
|
||||
if(help_browser == NULL)
|
||||
{
|
||||
help_browser = new QTextBrowser(this) ;
|
||||
help_browser = new MyTextBrowser(this,button) ;
|
||||
|
||||
QGraphicsDropShadowEffect * effect = new QGraphicsDropShadowEffect(help_browser) ;
|
||||
effect->setBlurRadius(30.0);
|
||||
|
Loading…
Reference in New Issue
Block a user