Handling input with OpenGL and Qt?
-
wrote on 18 Nov 2022, 08:48 last edited by benjysugi
How would I handle input with OpenGL in Qt (keyboard, mouse position, mouse button, etc)
In GLFW there's
glfwSetKeyCallback()
,glfwSetCursorPosCallback()
andglfwSetMouseButtonCallback()
. Are there any equivalents or something similar?How would I go about doing this?
Another thing I would like to know is if there's an equivalent to
glfwGetTime()
Thanks,
-
@benjysugi said in Handling input with OpenGL and Qt?:
How do I handle input on a QWidget?
QWidget has e.g. mosuePressEvent() and others.
-
Hi,
Are you thinking about QWindow ?
If so, it provides the same interface as QWidget for handling mouse and keyboard.
-
Hi,
Are you thinking about QWindow ?
If so, it provides the same interface as QWidget for handling mouse and keyboard.
-
@benjysugi said in Handling input with OpenGL and Qt?:
How do I handle input on a QWidget?
QWidget has e.g. mosuePressEvent() and others.
1/4