{"action":"created","issue":{"url":"https://api.github.com/repos/FreeMedForms/freemedforms/issues/69","labels_url":"https://api.github.com/repos/FreeMedForms/freemedforms/issues/69/labels{/name}","comments_url":"https://api.github.com/repos/FreeMedForms/freemedforms/issues/69/comments","events_url":"https://api.github.com/repos/FreeMedForms/freemedforms/issues/69/events","html_url":"https://github.com/FreeMedForms/freemedforms/issues/69","id":108782901,"number":69,"title":"disable wheelEvent() in combo box, spinbox, double spinbox, etc.","user":{"login":"jeromecc","id":6979021,"avatar_url":"https://avatars.githubusercontent.com/u/6979021?v=3","gravatar_id":"","url":"https://api.github.com/users/jeromecc","html_url":"https://github.com/jeromecc","followers_url":"https://api.github.com/users/jeromecc/followers","following_url":"https://api.github.com/users/jeromecc/following{/other_user}","gists_url":"https://api.github.com/users/jeromecc/gists{/gist_id}","starred_url":"https://api.github.com/users/jeromecc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeromecc/subscriptions","organizations_url":"https://api.github.com/users/jeromecc/orgs","repos_url":"https://api.github.com/users/jeromecc/repos","events_url":"https://api.github.com/users/jeromecc/events{/privacy}","received_events_url":"https://api.github.com/users/jeromecc/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/FreeMedForms/freemedforms/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":{"login":"jeromecc","id":6979021,"avatar_url":"https://avatars.githubusercontent.com/u/6979021?v=3","gravatar_id":"","url":"https://api.github.com/users/jeromecc","html_url":"https://github.com/jeromecc","followers_url":"https://api.github.com/users/jeromecc/followers","following_url":"https://api.github.com/users/jeromecc/following{/other_user}","gists_url":"https://api.github.com/users/jeromecc/gists{/gist_id}","starred_url":"https://api.github.com/users/jeromecc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeromecc/subscriptions","organizations_url":"https://api.github.com/users/jeromecc/orgs","repos_url":"https://api.github.com/users/jeromecc/repos","events_url":"https://api.github.com/users/jeromecc/events{/privacy}","received_events_url":"https://api.github.com/users/jeromecc/received_events","type":"User","site_admin":false},"milestone":null,"comments":2,"created_at":"2015-09-29T02:28:40Z","updated_at":"2015-09-29T17:22:48Z","closed_at":null,"body":"Users report high frequency of inadvertent changes to value of items (combo, spin, doublespin) due to involuntary usage of mouse wheel while hovering on widget.\r\n\r\nForm authors should have an option to disable wheelEvent() on items.\r\n\r\nFrom http://www.qtcentre.org/threads/33099-How-to-disable-wheelEvent%28%29\r\n```\r\n    void SomeClass::initializeStuff()\r\n    {\r\n        m_combo = new QComboBox(this);\r\n        m_combo->installEventFilter(this);\r\n    }\r\n     \r\n    bool SomeClass::eventFilter(QObject *obj, QEvent *event)\r\n    {\r\n        if(event->type() == QEvent::Wheel && obj == m_combo)\r\n        {\r\n            qDebug() << \"Wheel event blocked\";\r\n            return true;\r\n        }\r\n        return false;\r\n    }\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/FreeMedForms/freemedforms/issues/comments/144127342","html_url":"https://github.com/FreeMedForms/freemedforms/issues/69#issuecomment-144127342","issue_url":"https://api.github.com/repos/FreeMedForms/freemedforms/issues/69","id":144127342,"user":{"login":"jeromecc","id":6979021,"avatar_url":"https://avatars.githubusercontent.com/u/6979021?v=3","gravatar_id":"","url":"https://api.github.com/users/jeromecc","html_url":"https://github.com/jeromecc","followers_url":"https://api.github.com/users/jeromecc/followers","following_url":"https://api.github.com/users/jeromecc/following{/other_user}","gists_url":"https://api.github.com/users/jeromecc/gists{/gist_id}","starred_url":"https://api.github.com/users/jeromecc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeromecc/subscriptions","organizations_url":"https://api.github.com/users/jeromecc/orgs","repos_url":"https://api.github.com/users/jeromecc/repos","events_url":"https://api.github.com/users/jeromecc/events{/privacy}","received_events_url":"https://api.github.com/users/jeromecc/received_events","type":"User","site_admin":false},"created_at":"2015-09-29T17:22:48Z","updated_at":"2015-09-29T17:22:48Z","body":"\n>\n> Le 29/09/2015 04:28, jeromecc a écrit :\n> > Users report high frequency of inadvertent changes to value of items\n> > (combo, spin, doublespin) due to involuntary usage of mouse wheel while\n> > hovering on widget.\n> >\n> > Form authors should have an option to disable wheelEvent() on items.\n> >\n> > From\n> http://www.qtcentre.org/threads/33099-How-to-disable-wheelEvent%28%29\n> >\n> > | void SomeClass::initializeStuff()\n> > {\n> > m_combo = new QComboBox(this);\n> > m_combo->installEventFilter(this);\n> > }\n> >\n> > bool SomeClass::eventFilter(QObject *obj, QEvent *event)\n> > {\n> > if(event->type() == QEvent::Wheel && obj == m_combo)\n> > {\n> > qDebug() << \"Wheel event blocked\";\n> > return true;\n> > }\n> > return false;\n> > }\n> > |\n> >\n> >\n> On 09/29/2015 08:09 PM, Eric MAEKER wrote:\n>> This can be done inside the javascript code of the forms without any\n>> rebuild.\n>>\n>> Eric\nGood news! How would you do that Eric?\n\nDo you think it would be easier and quicker to do it each time in a\nJavaScript file or through an <options>DisableWheelEvent</options> with\na Qt/C++ source code change?\nWould it be possible to have a form wide option to disable mouse wheel\nevent so that we don't need to put an options xml markup inside each item?\n\nThank you!\n\njérôme\n\n-- \nOpenPGP / GPG key: 0x14B7E62420E51038\nI encrypt emails with GPG, Thunderbird & Enigmail.\nPlease do the same or use my secure contact form: https://jerome.cc/gpg\n\n\n"}}