[Qtce-preview-feedback] Qt UI design for Windows CE

Mateusz Loskot mateusz at loskot.net
Tue Feb 19 13:13:47 CET 2008


Maurice Kalinowski wrote:
> Mateusz Loskot wrote:
>> 1. Is there any run-time difference in how UI elements are manged
>> between designer-based and manually coded interface, or difference in
>> performance, or one of these two options is recommended for Windows CE.
>> Or there is no difference between coded by hand and generated UI with
>> designer, in case of Windows CE.
>>   
> As the ui files generated by designer get converted to regular source 
> code by uic, there should be no difference performance-wise.

Maurice,

Thanks for the confirmation.
I've read in the manual that "In general there is little or no
difference in developing Qt applications for Windows CE compared to any
of the other platforms(...)" but was wondering if there are any
performance issues worth to know about.

>> 2. Depending on target version of Windows CE/Windows Mobile,
>> there are a few options of menu bar/tool bar layout.
>> Does Qt support old-fashion toolbar with buttons placed at the bottom of
>> a windows, under Windows Mobile 5.0+ ?
>
> Yes, for the Qt/WinCE port we check on runtime whether the Qt 
> application is running on a plain Windows CE or on Windows Mobile. In 
> the latter case, the Menubar gets integrated into the native menu. 
> Unfortunately this is not represented currently inside designer.

OK. Thanks to Qt features, there are some tricks possible to ie. move 
toolbar to the bottom of the screen. Also, if window is displayed in 
full screen and the native menubar is not displayed, it's possible to 
design toolbar-only application. So, the variety of possibilities
is impressive :-)

I'm not a very experienced user of Qt, so I'm still discovering it.

>> 3. Considering standard Pocket PC screen size 240x320 and 320x240 in
>> horizontal orientation, are changes of screen orientation handled
>> automatically by ie. adding scrollbar. Also, is there any dedicated
>> signal emitted?
>
> Yes, orientation changes are handled automatically as a resize event.

Cool, this is really helpful.

> In case you want handle some custom action at orientation change, you can 
> check for the resized(int) signal of QDesktopWidget.. Please have in 
> mind, that Qt 'only' resizes, so if you want to add a scrollbar, make 
> sure to add appropriate flags to your window to automatically generate one.

Understood.

> Furthermore, if you open the virtual keyboard provided by Windows 
> Mobile, you can react to this event too. See examples/dialogs/sipdialog 
> for more information.

Yup, I've found that one. Great, there is everything I need.

>> 4. Qt and the designer does not uses dialog units (DLU) specific to
>> Windows, but all elements are resizable and positioned by layout
>> managers. Considering standard screen of Pocket PC size and the fact
>> that windows and dialogs under Windows Mobile are full screen,
>> would you recommend to
>> - use static form size 240x320
>> - set min/max size properties accordingly
>> - fit all controls to this size of form
>>
>> or may be there is no problem with designing forms of 480x640 and
>> layout managers will take care of appropriate resizing, in most cases.
>
> You can always choose to use the layout management by Qt to handle 
> arrangement of items/sizes of your widgets.

The layout management is a fantastic feature. Before I started to use Qt 
on Windows CE, I used ATL/WTL libraries and now I've discovered how must
these lack of the layout management thing :-)

> This might slow down the 
> initial show() on application startup a little bit, but on the other 
> hand you have the advantage, that you do not need to take care about 
> orientation changes etc. So I would not prefer one way or the other, it 
> depends on what you need for your project.

Sure, understood. Thank you very much for your assistance!

Greetings
-- 
Mateusz Loskot
http://mateusz.loskot.net


More information about the Qtce-preview-feedback mailing list