PDA

View Full Version : Tutorial / best practices for Qt development?


robbie
11-21-2009, 12:01 PM
I'm trying to port an application to Maemo (keepassx). I manage to get it running with the latest 4.6 environment but some screens need some rework.

Are there any docs/tutorials with best practices?

For example, the keepassx screens are designed so that a user can resize them. That makes no sense on the N900 because all windows are fixed (the width anyway). Are there guidelines/tips for screensizes?

The input fields are too small when using the default (see image below). If i make them 41 pixels high, it's usable. Are there any guidelines/tips for object sizes?

Are there any good/simple examples that shows usage of qt objects?

Maemo version:
http://www.xs4all.nl/~gnista/qt46maemo_edit.png

Qt Creator version:
http://www.xs4all.nl/~gnista/qt46maemo_edit2.png

Fargus
11-21-2009, 12:20 PM
I'm trying to port an application to Maemo (keepassx). I manage to get it running with the latest 4.6 environment but some screens need some rework.

Are there any docs/tutorials with best practices?

For example, the keepassx screens are designed so that a user can resize them. That makes no sense on the N900 because all windows are fixed (the width anyway). Are there guidelines/tips for screensizes?

The input fields are too small when using the default (see image below). If i make them 41 pixels high, it's usable. Are there any guidelines/tips for object sizes?

Are there any good/simple examples that shows usage of qt objects? ....

Have you tried the GUI Guidelines ? http://www.forum.nokia.com/info/sw.nokia.com/id/eb8a68ba-6225-4d84-ba8f-a00e4a05ff6f/Hildon_2_2_UI_Style_Guide.html

pH5
11-21-2009, 12:22 PM
For example, the keepassx screens are designed so that a user can resize them. That makes no sense on the N900 because all windows are fixed (the width anyway). Are there guidelines/tips for screensizes?

The input fields are too small when using the default (see image below). If i make them 41 pixels high, it's usable. Are there any guidelines/tips for object sizes?

I'm not sure about Qt specifics, but to all layout questions you should be able to find an answer in the Fremantle Master Layout Guide (http://www.forum.nokia.com/info/sw.nokia.com/id/e778ba1f-2507-4672-be45-798359a3aea7/Fremantle_Master_Layout_Guide.html).

robbie
11-21-2009, 12:47 PM
Thanks!

The master layout guide provides at least some sizes. Now see if i can translate that to the gui designer of Qt Designer..

qgil
11-22-2009, 03:18 PM
Maybe this helps: http://wiki.forum.nokia.com/index.php/Qt_for_Maemo_Developers_Guide

More at http://www.forum.nokia.com/Tools_Docs_and_Code/Documentation/Maemo.xhtml

robbie
11-23-2009, 02:13 AM
qgil, Thanks for the links. I think the first link would be helpfull on the page of the second link as well. The second link unfortunatly doesn't have an application that is created with the gui designer of Qt creator.

My problem is that i'm trying to port an existing application to Maemo. Most of the code runs fine but the gui is all messed up because keepassx normally is used on screens larger than 800x400 (aprox availible size without menubar).

What i'm looking for is a guide that tells how big you have to make the objects so that you can see what you get on the device. Here's what i found out so far:


You should create a gui specially for Maemo. Standard gui's won't work well (see screenshot).
Menu's look nice. Probably need a stylus to use them (but thats alright)
The labels are Nokia Sans 18
The textfields should be at least 40 pixels high so that the text fits in
You must disable code for handling the systray because the N900 doesn't have a systray and the application won't compile


Some anoyances:

Creation a gui with Qt creator designer is not wysiwyg. It's trial and error.
I can't seem to get the scrollarea working. That would probably make life easier on a limited screen height.

labra
01-06-2010, 09:55 AM
Is this still under development?

http://maemo.org/packages/view/keepassx/