1 Star 0 Fork 1.5K

lineCodeJm / ndd

forked from 爬山虎 / ndd 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
ctipwin.cpp 564 Bytes
一键复制 编辑 原始数据 按行查看 历史
#include "ctipwin.h"
#include <QTimer>
CTipWin::CTipWin(QWidget *parent)
: QWidget(parent)
{
ui.setupUi(this);
this->setWindowFlags(Qt::ToolTip);
QPalette palette(this->palette());
palette.setColor(QPalette::Background, QColor(0xfff29d));
this->setPalette(palette);
}
CTipWin::~CTipWin()
{
}
void CTipWin::setTipText(QString text)
{
ui.labelInfo->setText(text);
}
void CTipWin::showMsg(int sec)
{
show();
QTimer::singleShot(sec, this, SLOT(slot_delayClose()));
}
void CTipWin::slot_delayClose()
{
close();
}
C++
1
https://gitee.com/lineCodeJm/notepad--.git
git@gitee.com:lineCodeJm/notepad--.git
lineCodeJm
notepad--
ndd
master

搜索帮助