You are not logged in.

1

Tuesday, July 13th 2010, 1:38pm

Problem when naming the pushbutton as reset

Hi,

I am seeing a weird problem. When I am naming my push button as "Reset", in the emulator its showing gap between "R" and "e" as if additional space has been provided.
resetButton = new QPushButton(tr("Reset"), Central);
I also tried using setText but have the same effect. I dont have any problem when named differently.
Any idea what might be the problem.

Thanks.

Junior

Professional

  • "Junior" is male

Posts: 1,613

Location: San Antonio, TX USA

Occupation: Senior Secure Systems Engineer

  • Send private message

2

Tuesday, July 13th 2010, 1:45pm

Just tried this and can't reproduce what your seeing.
Maybe it is related to the style or font you may be using (global) or otherwise? Just a thought.

3

Tuesday, July 13th 2010, 2:21pm

Junior,

Thanks for the reply. I am using Qt 4.6.3 with Symbian 3 emulator. I am using the default font family. However I am using the font with size 4
font.setPointSize(4). In this case the space looks too odd. When I changed the name to "reset" its little better.

I tried with out any size i.e using default font size then its better but still its not normal.
I have attached both the buttons. Do you have the same way as it is shown in 1st attachment.
reticent has attached the following files:
  • reset.JPG (1.84 kB - 39 times downloaded - latest: Dec 31st 2010, 1:14pm)
  • reset1.JPG (1.87 kB - 8 times downloaded - latest: Jan 15th 2011, 11:03pm)

Junior

Professional

  • "Junior" is male

Posts: 1,613

Location: San Antonio, TX USA

Occupation: Senior Secure Systems Engineer

  • Send private message

4

Tuesday, July 13th 2010, 2:28pm

What style are you using? CleanLooks, Windows, other...?

5

Tuesday, July 13th 2010, 2:35pm

I am using with Carbide on windows. Also I am not using QtDesigner.
Apart that I didn't specify any other style.

Junior

Professional

  • "Junior" is male

Posts: 1,613

Location: San Antonio, TX USA

Occupation: Senior Secure Systems Engineer

  • Send private message

6

Tuesday, July 13th 2010, 2:54pm

I'm not using symbian so I can't replicate this. However I would add some debug lines in to show what font information is being used (font, pitch, size, etc... ). It may be that setting a font StyleStrategy like QFont::NoFontMerging might clear that up. Qt uses a best guess when it can't figure out pitch or font size and sometimes this isn't always the best answer like in your case here. Best I can offer.

7

Tuesday, July 13th 2010, 3:05pm

Thanks anyways junior. I am new to Qt and still in learning phase. I will try with what you suggested.
Also just wondering whether do you have any comments on the questions I asked here:
Adding app icon in status pane

Can you just let me know if you have any suggestions/hints on those.