查看完整版本: [-- 求助setshortcut的问题 --]

QTCN开发网 -> 《C++ GUI Qt 4编程》(第2版)专栏 -> 求助setshortcut的问题 [打印本页] 登录 -> 注册 -> 回复主题 -> 发表主题

youngdavid 2013-12-18 21:58

求助setshortcut的问题

我在跟着做《C++ GUI Qt4 编程》书上39页的tools菜单下的Recalculate的时候,出来的程序按F9一直没效果,代码是这样的:
    recalculateAction= new QAction(tr("&Recalculate"), this);
    recalculateAction->setShortcut(Qt::Key_F9);
    recalculateAction->setStatusTip(tr("Recalculate of the spreadsheet"));
    connect(recalculateAction,SIGNAL(triggered()), spreadsheet, SLOT(recalculate()));
不知道为什么不灵,哪位大神帮忙看看,小弟感激不尽~

cavendish 2013-12-19 16:56
Qt 4.8 on Mac?
https://bugreports.qt-project.org/browse/QTBUG-34820

youngdavid 2013-12-19 18:59
我的不是Mac,而且我用论坛里的代码运行 也是F9不灵,不知道为何


查看完整版本: [-- 求助setshortcut的问题 --] [-- top --]



Powered by phpwind v8.7 Code ©2003-2011 phpwind
Gzip disabled