Reply
Thread Tools
Posts: 246 | Thanked: 2,574 times | Joined on Jan 2010 @ Egypt, Cairo
#1
I'm trying to make a 3x3 grid of buttons using Qt. The buttons however seem to tile instead of being stretched?! I've tried this using pyqt, screenshot taken from phone N900, and qt with c++ same result on scratchbox. Is this a bug with maemo qt or I'm missing something??

Note that preview on my computer (ubuntu karmic) produces the correct view. And when doing a 1 row 2 columns grid also stretches and displays correctly. Size policy set to preferred. Attached is a screenshot and a zipped file containing the working and non working versions of grid.
Attached Images
 
Attached Files
File Type: zip code.zip (2.0 KB, 119 views)
 
Posts: 434 | Thanked: 325 times | Joined on Sep 2009
#2
Originally Posted by tgalal View Post
I'm trying to make a 3x3 grid of buttons using Qt. The buttons however seem to tile instead of being stretched?! I've tried this using pyqt, screenshot taken from phone N900, and qt with c++ same result on scratchbox. Is this a bug with maemo qt or I'm missing something??

Note that preview on my computer (ubuntu karmic) produces the correct view. And when doing a 1 row 2 columns grid also stretches and displays correctly. Size policy set to preferred. Attached is a screenshot and a zipped file containing the working and non working versions of grid.
This "feature" came with the new firmware. If I remember correctly, the maximum height for QPushButton is 72 (or 71... I can't remember exactly). If it's more than that you will get the effect seen in your screenshot.
 
Posts: 246 | Thanked: 2,574 times | Joined on Jan 2010 @ Egypt, Cairo
#3
Originally Posted by Sasler View Post
This "feature" came with the new firmware. If I remember correctly, the maximum height for QPushButton is 72 (or 71... I can't remember exactly). If it's more than that you will get the effect seen in your screenshot.
As I mentioned, if the grid is only 2 rows and 1 column, the buttons stretch and fill up the screen correctly
 
Posts: 434 | Thanked: 325 times | Joined on Sep 2009
#4
Originally Posted by tgalal View Post
As I mentioned, if the grid is only 2 rows and 1 column, the buttons stretch and fill up the screen correctly
In that case they are definitely higher than 72 pixels. Maybe you need to use custom graphics with them.
 
Posts: 1 | Thanked: 0 times | Joined on Mar 2010
#5
Hi

It seems that there is somehing in RC that causes that. You can try to unset RC variable by typeing to shell:

unset GTK2_RC_FILES

ans when try to launch the program
 
Posts: 254 | Thanked: 122 times | Joined on Nov 2009
#6
Originally Posted by pekka.fi View Post
Hi

It seems that there is somehing in RC that causes that. You can try to unset RC variable by typeing to shell:

unset GTK2_RC_FILES

ans when try to launch the program
Yes, this helps, partially. But then application would look like usual QT application, which is very different from style used by n900. Is there another solution?
 
Venemo's Avatar
Posts: 1,296 | Thanked: 1,773 times | Joined on Aug 2009 @ Budapest, Hungary
#7
This issue is also present for me, for any button that is more than about 70 pixels high.

It has been present in Maemo's Qt since 4.5.3 for me.

I think it is worth a bug report for the Qt team.
 
w00t's Avatar
Posts: 1,055 | Thanked: 4,107 times | Joined on Oct 2009 @ Norway
#8
Yes, I'd file a bug report at http://bugreports.qt.nokia.com/. And/or, if you're on european time (since the developers are on european time), come talk to someone in #qt-maemo on freenode.
__________________
i'm a Qt expert and former Jolla sailor (forever sailing, in spirit).
if you like, read more about me.
if you find me entertaining, or useful, thank me. if you don't, then tell me why.
 
Posts: 254 | Thanked: 122 times | Joined on Nov 2009
#9
From IRC
<harryF> KiberGus: Maemo style guide enforces 72px buttons, otherwise, the styling is broken
<KiberGus> harryF: Isn't this a bug? I have penty of space on a screen,
<harryF> KiberGus: Maemo styles everything with fixed-size images, and platform default is 72px
Actually, I don't think, that it's good.
 

The Following User Says Thank You to KiberGus For This Useful Post:
Reply

Thread Tools

 
Forum Jump


All times are GMT. The time now is 13:34.