English 中文(简体)
QtEmbedded (for Kindle!): How are the device plugins supposed to get feedback from the app?
原标题:

I m not having an easy time making a workable mouse pointer interface on the Kindle with Qt (unofficial, of course). The fiveway joystick can t track more than one direction at a time (no diagonal moves), and the screen is too slow to update for good feedback.

I ve got limited acceleration, but with the screen delay it s very frustrating to use. When you release the fiveway, the mouse will keep moving for 1-2 seconds... and it s not always a constant delay.

Given these limitations, I really need help from the application side. I need a method the mouse driver plugin could use to identify what the acceleration profile should be... so it can say slow down as it crosses a button. The app could help define regions where different acceleration made sense (start with single pixel shifts in a drawing area, but start at 10 or so for dialog dead space). More simply, the application should be able to tell the mouse pointer to transition from cursor to keypad mode, etc.

However, I can enumerate the mouse drivers, but I don t seem to get driver names. They re not QObjects, so there s no qobject_cast. How can I identify them as mine, and safe to cast to? I can force a cast, but that seems pretty lame.

Do I just assume the plugins are mine and cast them?

I d like some simple signal/slot way to wire this up.

UPDATE

Maybe the plugins can notify the app somehow. Maybe using QApplication::topLevelWidgets(), trying qobject_cast looking for the QMainWindow... then sending it a custom signal with the plugin s internal QObject-based signal handler class? Then the app could turn around and set up the connections it actually wanted to deal with. I ll try it tonight or tomorrow.

问题回答

Why don t you implement right as "tab" and left as "shift+tab". That way, you can move the focus around. Now, just center the pointer over the active area of the widget with focus (think checkboxes, they need the pointer over the box, not the center). I expect the user to be more interested in this and actually having a pointer to mover around in an environment where it is down right impossbile to use.





相关问题
Qt: Do events get processed in order?

If I had a class A, where one of its functions does: void A::func() { emit first_signal(); emit second_signal(); } Assuming that a class B has 2 slots, one connected to first_signal, and the ...

How to determine how much free space on a drive in Qt?

I m using Qt and want a platform-independent way of getting the available free disk space. I know in Linux I can use statfs and in Windows I can use GetDiskFreeSpaceEx(). I know boost has a way, ...

Drag & drop with .ui files

I m having big troubles with drag & drop. I ve created a new Qt Designer Form Class in which I have one QListWidget and one QWidget. Now I want to enable dragging & dropping between these two ...

Link errors on Snow Leopard

I creating a small desktop application using Qt and Poco on Mac OS X Snow Leopard. Qt works fine, but once I started linking with Poco I get the following warning: ld: warning: in /Developer/SDKs/...

Showing two windows in Qt4

My friend and I have each created parts of a GUI using Qt 4. They both work independently and I am trying to integrate his form with the my main window. As of now this is the code I am using to try ...

Qt equivalent of .NET data binding?

Is there an equivalent of .NET s data binding in Qt? I want to populate some combo boxes and other widgets with QStrings that refer to specific entities in my database. However, it would be cleaner ...

热门标签