textbrowsertweaked1.h 525 B

123456789101112131415161718192021222324252627
  1. #ifndef TEXTBROWSERTWEAKED1_H
  2. #define TEXTBROWSERTWEAKED1_H
  3. #include <QTextBrowser>
  4. #include <QUrl>
  5. class TextBrowserTweaked1 : public QTextBrowser
  6. {
  7. Q_OBJECT
  8. public:
  9. TextBrowserTweaked1(QWidget * parent);
  10. //virtual void setSource(const QUrl & url);
  11. signals:
  12. void mouseReleased();
  13. //void navigatedTo(const QUrl & link);
  14. protected:
  15. void mouseReleaseEvent(QMouseEvent *event) {
  16. QTextBrowser::mouseReleaseEvent(event);
  17. emit mouseReleased();
  18. }
  19. };
  20. #endif // TEXTBROWSERTWEAKED1_H