Some time ago, I decided that the only feasible way for Stockona to run well on Meego Harmattan was to re-work the UI using Qt components. The main reason was window focus issue that's very annoying to me. For whatever reason, the VKB in Harmattan doesn't work well with pure QML TextInput element. The focus becomes sticky once VKB is shown. I have tried to fill the un-used area on screen with MouseArea element to make de-focusing works like how it should be, but then sometimes when I switched in/out of task manager, the VKB popped up for no reason. I gave up debugging this and step-by-step changed the UI to Qt component. I was unsure if it would be worthwhile doing so, but in the end I think it was a correct decision. Qt component works great, and takes care of the UI design work so I have more time fixing some of the logic bugs instead of trying to put together graphic elements like what I did on Fremantle. I found the Sheet and Dialog (QueryDialog to be specific) elements to be especially handy for taking user inputs and displaying information to users.
The only disadvantage using Qt component is of course the portability becomes an issue for other platforms. Now I have been focusing on the Harmattan version and made several releases, the code base has become quite different to Fremantle's version in several areas. I am kind of lazy to merge the changes back and seriously hope the community project to make Qt component available on Fremantle will be working soon.
Showing posts with label QtSDK. Show all posts
Showing posts with label QtSDK. Show all posts
Friday, August 26, 2011
Porting to Harmattan (3)
Monday, July 25, 2011
Porting to Harmattan (2)
To recap, the issues I had earlier were:
1) VKB stays visible once launched.
2) App stays in landscape mode.
3) After a few launches, an empty toolbar showed up along the bottom of the screen and stayed there afterwards.
For (3), I found out it was due to setting the QDeclarativeView to showMaximized() instead of showFullScreen().
For (1), I couldn't figure out why TextInput element is not working probably. I tried changing to manually handling the focus, but still saw the same issue happening. In the end, I decided to apply a dirty trick. I simply set closeSoftwareInputPanel () method of TextInput elements when user clicks outside the TextInput fields, and further calling the method again when exiting the setting menu. Even with this ugly patch, flicking action on Stockona still sometimes invokes the VKB for no reasons.... again, the root cause is a mystery to me for now.
For (2), I have tried wrapping the QML into Qt components. At first, I tried wrapping my main QML page into a Page element, then push it into PageStackWindow. For whatever reasons, it didn't work. I then found out about the Window element. The documentation says it can wrap any QtObject and although the doc suggests not to use it directly, I found it worked for me.
The last thing I did today was changing the control button height so it's easier to click on them instead of clicking to the symbol list below.
At the end of the day, I made some progress but I am unhappy that I have little idea about the root causes of the various issues. Hopefully the community will figure out some commonly-good practices when using Qt components, and also the Qt documentation for Nokia's Qt components will improve with time.
PS - One thing worth noting is I found out it was super easy to set up N950 to connect to QtSDK by WLAN. Just fire the "SDK connection tool," then enter all the information in QtSDK and the deployment to device just works afterall. It greatly sped up the development time! (N900 probably supports this as well, but I remember you need to install some MADDE-related packages... I'm glad those packages are built into N950 by default.)
1) VKB stays visible once launched.
2) App stays in landscape mode.
3) After a few launches, an empty toolbar showed up along the bottom of the screen and stayed there afterwards.
For (3), I found out it was due to setting the QDeclarativeView to showMaximized() instead of showFullScreen().
For (1), I couldn't figure out why TextInput element is not working probably. I tried changing to manually handling the focus, but still saw the same issue happening. In the end, I decided to apply a dirty trick. I simply set closeSoftwareInputPanel () method of TextInput elements when user clicks outside the TextInput fields, and further calling the method again when exiting the setting menu. Even with this ugly patch, flicking action on Stockona still sometimes invokes the VKB for no reasons.... again, the root cause is a mystery to me for now.
For (2), I have tried wrapping the QML into Qt components. At first, I tried wrapping my main QML page into a Page element, then push it into PageStackWindow. For whatever reasons, it didn't work. I then found out about the Window element. The documentation says it can wrap any QtObject and although the doc suggests not to use it directly, I found it worked for me.
The last thing I did today was changing the control button height so it's easier to click on them instead of clicking to the symbol list below.
At the end of the day, I made some progress but I am unhappy that I have little idea about the root causes of the various issues. Hopefully the community will figure out some commonly-good practices when using Qt components, and also the Qt documentation for Nokia's Qt components will improve with time.
PS - One thing worth noting is I found out it was super easy to set up N950 to connect to QtSDK by WLAN. Just fire the "SDK connection tool," then enter all the information in QtSDK and the deployment to device just works afterall. It greatly sped up the development time! (N900 probably supports this as well, but I remember you need to install some MADDE-related packages... I'm glad those packages are built into N950 by default.)
Friday, July 22, 2011
Porting to Harmattan (1)
Building the deb using QtSDK was pretty straightforward. All I did was install the experimental Harmattan components and removed stockona.pro.user so I could re-select targets.
However, the deployment was a little cumbersome. First, I need to change to root by:
devel-su, then type in password "rootme"
At first the system wouldn't install, later after some googling and try-n-err I found out it was due to me leaving the package manager running in the background. After installing the app, I could launch the app in terminal by the app name, without needing to pre-pend "run-standalone.sh" as in Maemo 5.
Then I found three blockers:
1) VKB stays visible once launched.
2) App stays in landscape mode.
3) After a few launches, an empty toolbar showed up along the bottom of the screen and stayed there afterwards.
I got the feeling that the software on N950 is a bit unstable because there are inconsistencies in the behaviors of Stockona. And since the camera app is not working on my unit, I decide to do a reflash and call it a day, or a night to be precise.
The good thing is, I found a bug in the app during the process.
However, the deployment was a little cumbersome. First, I need to change to root by:
devel-su, then type in password "rootme"
At first the system wouldn't install, later after some googling and try-n-err I found out it was due to me leaving the package manager running in the background. After installing the app, I could launch the app in terminal by the app name, without needing to pre-pend "run-standalone.sh" as in Maemo 5.
Then I found three blockers:
1) VKB stays visible once launched.
2) App stays in landscape mode.
3) After a few launches, an empty toolbar showed up along the bottom of the screen and stayed there afterwards.
I got the feeling that the software on N950 is a bit unstable because there are inconsistencies in the behaviors of Stockona. And since the camera app is not working on my unit, I decide to do a reflash and call it a day, or a night to be precise.
The good thing is, I found a bug in the app during the process.
Subscribe to:
Posts (Atom)