![]() |
Maemo PyQt Menu Problem
I've got an annoying problem with my PyQt application menu when running on Maemo (works as expected in KDE).
Essentially the 'Quit' item is not added to the File menu, but instead is added as last top level item on the menu bar. The code which shows the problem is; Code:
import sys |
Re: Maemo PyQt Menu Problem
As an update, I think I realise what's happening and it is a Platform Dependent issue. It appears Qt by default creates or moves the Quit/Exit menu as the last top level menu item.
I've been trying to find out how to override (or just detect) this behaviour and have an app that runs equally on PC and tablet. The variable Q_WS_HILDON is supposed to be defined in Qt for maemo, but is not defined within PyQt. If it was defined I would be happy with the following; Code:
try: |
Re: Maemo PyQt Menu Problem
*bump*
anyone know of a way to detect hildon from python or pyqt? |
Re: Maemo PyQt Menu Problem
something like this could work:
Code:
try: |
Re: Maemo PyQt Menu Problem
Quote:
|
Re: Maemo PyQt Menu Problem
You could check for /proc/component_version but then you'd be limiting yourself to tablets, not just things which use hildon (i.e. Mer on an x86 computer)
|
Re: Maemo PyQt Menu Problem
the overhead is indeed pretty high if u don't use the hildon bindings at all afterwards. but at least I could find out that pyqt4 for maemo definitely does not support the Q_WS_HILDON option, as described in the qt4hildon wiki. but it has been reported as an enhancement there, so perhaps it will be implemented soon ;) the hint from the developers there was as well to use the /proc directory.
Hope I could help, cheers daniel |
Re: Maemo PyQt Menu Problem
Thanks qwerty12 and danielwilms.
I'm going to go with /proc/component_version suggestion. Although tablets themselves will be the target, I think it still fits my needs. I assume qt is putting the close/quit option as last top level item for useability with stylus/finger input on the tablet. So I'm happy to follow this convention. Thanks again. |
All times are GMT. The time now is 14:15. |
vBulletin® Version 3.8.8