mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-15 20:42:29 -04:00
Changed help buttons from QPushButton to QToolButton to use auto raise effect.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@6647 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
7be951eebf
commit
0051782aef
9 changed files with 49 additions and 91 deletions
|
@ -1,7 +1,7 @@
|
|||
#include <iostream>
|
||||
#include <retroshare-gui/mainpage.h>
|
||||
#include <QGraphicsBlurEffect>
|
||||
#include <QPushButton>
|
||||
#include <QAbstractButton>
|
||||
#include <QGraphicsDropShadowEffect>
|
||||
|
||||
MainPage::MainPage(QWidget *parent , Qt::WindowFlags flags ) : QWidget(parent, flags)
|
||||
|
@ -12,19 +12,19 @@ MainPage::MainPage(QWidget *parent , Qt::WindowFlags flags ) : QWidget(parent, f
|
|||
class MyTextBrowser: public QTextBrowser
|
||||
{
|
||||
public:
|
||||
MyTextBrowser(QWidget *parent,QPushButton *bt)
|
||||
MyTextBrowser(QWidget *parent,QAbstractButton *bt)
|
||||
: QTextBrowser(parent),button(bt)
|
||||
{
|
||||
}
|
||||
|
||||
virtual void mousePressEvent ( QMouseEvent * e )
|
||||
virtual void mousePressEvent ( QMouseEvent* )
|
||||
{
|
||||
hide() ;
|
||||
button->setChecked(false) ;
|
||||
}
|
||||
|
||||
protected:
|
||||
QPushButton *button ;
|
||||
QAbstractButton *button ;
|
||||
};
|
||||
|
||||
void MainPage::showHelp(bool b)
|
||||
|
@ -40,7 +40,7 @@ void MainPage::showHelp(bool b)
|
|||
help_browser->hide() ;
|
||||
}
|
||||
|
||||
void MainPage::registerHelpButton(QPushButton *button,const QString& help_html_txt)
|
||||
void MainPage::registerHelpButton(QAbstractButton *button,const QString& help_html_txt)
|
||||
{
|
||||
if(help_browser == NULL)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue