在QT中启用触摸屏时出错

时间:2017-04-29 11:02:20

标签: attributes touch qt5

我想在QT中启用触摸屏,所以我给了:

(SELECT min(submissiondateandtime) FROM price_submissions)

但它显示以下错误:

  

错误:没有匹配函数来调用' QPushButton :: setAttribute(bool)'            UI-> pushButton->的setAttribute((QT :: WA_AcceptTouchEvents,真));                                                                    ^

1 个答案:

答案 0 :(得分:0)

删除多余的括号:

ui->pushButton->setAttribute(Qt::WA_AcceptTouchEvents,true);

VS

ui->pushButton->setAttribute((Qt::WA_AcceptTouchEvents,true));