QLabel *m_tip_prompt = NULL;
m_tip_prompt=new QLabel;
QPoint aaa = cursor().pos();//获取鼠标位置
this->m_tip_prompt->setText(“测试”);
this->m_tip_prompt->raise();
this->m_tip_prompt->move(aaa.rx(), aaa.ry(),);
this->m_tip_prompt->adjustSize();//控件宽度根据text自适应
this->m_tip_prompt->setStyleSheet(“background-color:red;font:20px;”);//设置样式