Files
MyChat_Client/toast.h
2025-06-07 11:42:23 +08:00

23 lines
444 B
C++
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#pragma once
#include <QDialog>
#include <QWidget>
#include <QApplication>
#include <QScreen>
#include <QVBoxLayout>
#include <QLabel>
#include <QTimer>
class Toast : public QDialog
{
Q_OBJECT
public:
//此处并不需要指定父窗口,全局通知的父窗口就是桌面
Toast(const QString& text);
//并不需要手动的来new这个对象而是通过showMessage来弹出
static void showMessage(const QString& text);
};