[Qt-interest] Customizing a Directional Control Widget

Jason H scorp1us at yahoo.com
Wed Aug 24 17:03:14 CEST 2011


I'd just make a custom widget and create vector from widget center, apply deadbands, and use that.

Somethings to consider:
Can you do two directions at once or just one? 

Are the speeds independently variable or just on/off


For the keyboard, you'd just assign a magnitude of 1 to whatever vector the keys pressed are.
The output of the widget could come in many formats:
Bitmask {up, down, left right}
Angle & Mag {45degrees, 0.76 }
discrete vector (ideal for keyboard) {up: {-1, 1}, left: {-1, 1}}

Anyway, without knowing what your system is capable of, we don't know how elegant to make it.




________________________________
From: Dooit <dooit.lee at gmail.com>
To: qt-interest <qt-interest at qt.nokia.com>
Sent: Wednesday, August 24, 2011 10:52 AM
Subject: [Qt-interest]  Customizing a Directional Control Widget


Hi, I want to create a directional control widget for controlling camera's PTZ. I draw it out, but I found I can only use mouse to use this widget and I don't know how to involved keyboard control in it. I think I should use a widget including five QPushButtons, but that would not be elegant design. I need the directional control widget: 1. keyboard controlling; 2. Outlook and design should be elegant. I currently can't figure out how to do this, I know it's really a simple (maybe a bit of stupid) question, but if somebody can help, I really appreciate.


-- 
Victory Loves Preparation.
Me: http://about.me/dooit 

_______________________________________________
Qt-interest mailing list
Qt-interest at qt.nokia.com
http://lists.qt.nokia.com/mailman/listinfo/qt-interest
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20110824/d75a7826/attachment.html 


More information about the Qt-interest-old mailing list