tooltiplabel.h 511 B

12345678910111213141516171819202122232425262728293031
  1. #ifndef TOOLTIPLABEL_H
  2. #define TOOLTIPLABEL_H
  3. #include <QWidget>
  4. #include <QGraphicsOpacityEffect>
  5. namespace Ui {
  6. class TooltipLabel;
  7. }
  8. class TooltipLabel : public QWidget
  9. {
  10. Q_OBJECT
  11. public:
  12. explicit TooltipLabel(QWidget *parent = 0);
  13. ~TooltipLabel();
  14. public slots:
  15. void show();
  16. void updateText(QString text);
  17. void updateOpacity(double opacity);
  18. void hide();
  19. private:
  20. Ui::TooltipLabel *ui;
  21. QGraphicsOpacityEffect effect;
  22. bool isHidden;
  23. };
  24. #endif // TOOLTIPLABEL_H