Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
Contributor
Posts: 22
Registered: ‎02-02-2012
My Device: none
My Carrier: none
Accepted Solution

Small controls in Qt application

Some parts of Qt controls in my playbook application are very small (especially, arrows in a QDateEdit and a QSpinBox). It is really hard to click them with my fat finger!

Does anybody know what to do?

Developer
Posts: 133
Registered: ‎03-28-2011
My Device: BlackBerry 9900 & PlayBook
My Carrier: Bell

Re: Small controls in Qt application

A few months ago when I was experimenting with Qt's Widgets, I ran into this issue too.

 

My ultimate suggestion would be to use QML instead of QWidgets, since they're tailored for touchscreen interfaces. Moreover, it will ease your progression to Cascades.

 

That being said, if you want to resolve your issues now, I can make some suggestions. Basically, Qt is defaulting to a certain UI style, where the sizes are "small". It's expecting that you're using a mouse and keyboard, so it's sizing controls according to that.

 

The solution is to make the controls bigger. While each widget does have its own methods to do that, the beauty of Qt is the ability to apply stylesheets for your entire application. It's great, since you can have a consistent look and feel across your applications. 

 

For your scenario, you could use the stylesheet to adjust the default sizes for the controls you're using. 

 

http://qt-project.org/doc/qt-4.8/stylesheet.html

 

That link should get you started with everything you should need to accomplish what you're looking for. 

 

Good luck!


Founder of Pulsecode Inc. and taab
Authomator - Two-factor authentication codes on BlackBerry 10 - http://www.xitijpatel.com/ - Follow @xitijpatel
Is there a helpful or useful post in this thread? Click the thumbs up on it so that other people can find it more easily!
Highlighted
Contributor
Posts: 22
Registered: ‎02-02-2012
My Device: none
My Carrier: none

Re: Small controls in Qt application

Thank you very much, I' ll try that.