设置文本提示框:
QToolTip::showText(mapToGlobal(ui->ctt_id->pos()+QPoint(0, ui->ctt_id->height()/2)),
"请输入正确的票号", this);
这里将提示文本显示到指定窗口的左下面,ui->ctt_id是需要显示提示文本的控件。
设置文本提示框:
QToolTip::showText(mapToGlobal(ui->ctt_id->pos()+QPoint(0, ui->ctt_id->height()/2)),
"请输入正确的票号", this);
这里将提示文本显示到指定窗口的左下面,ui->ctt_id是需要显示提示文本的控件。
转载于:https://my.oschina.net/u/3489228/blog/1507646