[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: Coding help needed
From:       James Richard Tyrer <tyrerj () acm ! org>
Date:       2008-06-07 16:37:23
Message-ID: 484AB943.8050906 () acm ! org
[Download RAW message or body]

Kevin Krammer wrote:
> On Saturday 07 June 2008, James Richard Tyrer wrote:
>> Aaron J. Seigo wrote:
>>> On Saturday 07 June 2008, James Richard Tyrer wrote:
>>>> I thought that I should use: "QFontInfo::pixelSize()" but I seem to be
>>>> missing something because I get strange error messages.
>>> what are the error messages?
>> Using:
>>
>>    int size = QFontInfo::pixelSize(KGlobalSettings::menuFont);
> 
> 
> Basically three syntactical errors:
> 
> - menuFont is a method so the parenthese of the method call are missing

That was a mistake in the email. :-|  Why didn't I copy and paste?

> - you need a QFontInfo object/instance to call pixelSize() since it is not a 
> static method
> - the pixelSize() method does not take parameters, but rather returns a value 
> of the object it is called on
> 
> int size = QFontInfo(KGlobalSettings::menuFont()).pixelSize();
> 
Yes, that was the problem.  I tried the ".pixelSize()" syntax (and 
several other permutations) but didn't have the rest of the expression 
correct.

Thanks

-- 
JRT
 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic