Trolltech Home | Qt-jambi-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 1

Qt-jambi-interest Archive, October 2006
Problems upgrading...


Message 1 in thread

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
I've been upgrading to the 3rd version of your tech preview. Finally
JavDoc! Great stuff!<br>
However, I have some problems in my code which naturally arises since
you started using<br>
enums (great too) instead of integers. <br>
<br>
However, some integers flags are still there, how do I for instance
upgrade from<br>
<br>
QLabel.setFrameStyle(QFrame.Panel | QFrame.Raised);<br>
<br>
to the new version?<br>
<br>
Also, I'm having a bit problems using Qtrl-Q in IntelliJ, sometimes
errors like this occurs:<br>
<br>
<img src="cid:part1.00040003.09000905@xxxxxxxxxxx"; alt=""><br>
<br>
<br>
Regards,<br>
Helge F.<br>
</body>
</html>

JPEG image

JPEG image


Message 2 in thread

Hi, Helge!

Helge Fredriksen wrote:

> I've been upgrading to the 3rd version of your tech preview. Finally 
> JavDoc! Great stuff!
> However, I have some problems in my code which naturally arises since 
> you started using
> enums (great too) instead of integers.
>
> However, some integers flags are still there, how do I for instance 
> upgrade from
>
> QLabel.setFrameStyle(QFrame.Panel | QFrame.Raised);


Indeed, setFrameStyle() also takes an int in the original C++ API, 
because it's a convenience function that takes values from several 
different enum types, so we can't make it type safe using the generic 
QFlags pattern.

As for your question, the way to get the value of an enum in Qt Jambi is 
to call the value() method on the enum objects:

label.setFrameStyle(QFrame.Shape.Panel.value() | 
QFrame.Shadow.Raised.value());

or

label.setFrameShape(QFrame.Shape.Panel);
label.setFrameShadow(QFrame.Shadow.Raised);

>
> Also, I'm having a bit problems using Qtrl-Q in IntelliJ, sometimes 
> errors like this occurs:

I'm not quite sure why this is happening, but there seems to be a 
problem with some of the links to enums in the javadocs. I've taken note 
of this.

The javadocs are still a work in progress, so please let us know if you 
find any other problems or have any suggestions for them.

-- Eskil



Message 3 in thread

> The javadocs are still a work in progress, so please let us 
> know if you 
> find any other problems or have any suggestions for them.

Many links from the online documentation are broken, e.g. on the QPushButton javadoc:

http://doc.trolltech.com/qtjambi-1.0/gui/QPushButton.html

All the links except those in the detailed description point to doc.trolltech.com/com/trolltech/ instead of
doc.trolltech.com/qtjambi-1.0, for example the link for the constructor :

http://doc.trolltech.com/com/trolltech/qt/gui/QPushButton.html#QPushButton()

It's not that bad, since it's easy to adjust the URL, but I suppose Helge's problem is similar, albeit for the embedded javadoc.

Cheers,
Romain Pokrzywka 
Software Engineer
Klaralvdalens Datakonsult AB

Nb: Thanks for the explanation on extending enums. Now it's all crystal-clear :-)

> -----Original Message-----
> From: Eskil A. Blomfeldt [mailto:eblomfel@xxxxxxxxxxxxx] 
> Sent: Friday, October 27, 2006 2:27 PM
> To: Helge Fredriksen
> Cc: qt-jambi-interest@xxxxxxxxxxxxx
> Subject: Re: Problems upgrading...
> 
> Hi, Helge!
> 
> Helge Fredriksen wrote:
> 
> > I've been upgrading to the 3rd version of your tech 
> preview. Finally 
> > JavDoc! Great stuff!
> > However, I have some problems in my code which naturally 
> arises since 
> > you started using
> > enums (great too) instead of integers.
> >
> > However, some integers flags are still there, how do I for instance 
> > upgrade from
> >
> > QLabel.setFrameStyle(QFrame.Panel | QFrame.Raised);
> 
> 
> Indeed, setFrameStyle() also takes an int in the original C++ API, 
> because it's a convenience function that takes values from several 
> different enum types, so we can't make it type safe using the generic 
> QFlags pattern.
> 
> As for your question, the way to get the value of an enum in 
> Qt Jambi is 
> to call the value() method on the enum objects:
> 
> label.setFrameStyle(QFrame.Shape.Panel.value() | 
> QFrame.Shadow.Raised.value());
> 
> or
> 
> label.setFrameShape(QFrame.Shape.Panel);
> label.setFrameShadow(QFrame.Shadow.Raised);
> 
> >
> > Also, I'm having a bit problems using Qtrl-Q in IntelliJ, sometimes 
> > errors like this occurs:
> 
> I'm not quite sure why this is happening, but there seems to be a 
> problem with some of the links to enums in the javadocs. I've 
> taken note 
> of this.
> 
> The javadocs are still a work in progress, so please let us 
> know if you 
> find any other problems or have any suggestions for them.
> 
> -- Eskil
> 
> 


Message 4 in thread

Another thing missing is the name of the variables in the parameter 
list. I'm not able to
see this when I press Ctrl-P in IntelliJ inside the argument listing of 
the method signature.
Usually, these names helps a lot to understand what's going on in the code.

Helge F.

Romain Pokrzywka wrote:
>> The javadocs are still a work in progress, so please let us 
>> know if you 
>> find any other problems or have any suggestions for them.
>>     
>
> Many links from the online documentation are broken, e.g. on the QPushButton javadoc:
>
> http://doc.trolltech.com/qtjambi-1.0/gui/QPushButton.html
>
> All the links except those in the detailed description point to doc.trolltech.com/com/trolltech/ instead of
> doc.trolltech.com/qtjambi-1.0, for example the link for the constructor :
>
> http://doc.trolltech.com/com/trolltech/qt/gui/QPushButton.html#QPushButton()
>
> It's not that bad, since it's easy to adjust the URL, but I suppose Helge's problem is similar, albeit for the embedded javadoc.
>
> Cheers,
> Romain Pokrzywka 
> Software Engineer
> Klaralvdalens Datakonsult AB
>
> Nb: Thanks for the explanation on extending enums. Now it's all crystal-clear :-)
>
>   
>> -----Original Message-----
>> From: Eskil A. Blomfeldt [mailto:eblomfel@xxxxxxxxxxxxx] 
>> Sent: Friday, October 27, 2006 2:27 PM
>> To: Helge Fredriksen
>> Cc: qt-jambi-interest@xxxxxxxxxxxxx
>> Subject: Re: Problems upgrading...
>>
>> Hi, Helge!
>>
>> Helge Fredriksen wrote:
>>
>>     
>>> I've been upgrading to the 3rd version of your tech 
>>>       
>> preview. Finally 
>>     
>>> JavDoc! Great stuff!
>>> However, I have some problems in my code which naturally 
>>>       
>> arises since 
>>     
>>> you started using
>>> enums (great too) instead of integers.
>>>
>>> However, some integers flags are still there, how do I for instance 
>>> upgrade from
>>>
>>> QLabel.setFrameStyle(QFrame.Panel | QFrame.Raised);
>>>       
>> Indeed, setFrameStyle() also takes an int in the original C++ API, 
>> because it's a convenience function that takes values from several 
>> different enum types, so we can't make it type safe using the generic 
>> QFlags pattern.
>>
>> As for your question, the way to get the value of an enum in 
>> Qt Jambi is 
>> to call the value() method on the enum objects:
>>
>> label.setFrameStyle(QFrame.Shape.Panel.value() | 
>> QFrame.Shadow.Raised.value());
>>
>> or
>>
>> label.setFrameShape(QFrame.Shape.Panel);
>> label.setFrameShadow(QFrame.Shadow.Raised);
>>
>>     
>>> Also, I'm having a bit problems using Qtrl-Q in IntelliJ, sometimes 
>>> errors like this occurs:
>>>       
>> I'm not quite sure why this is happening, but there seems to be a 
>> problem with some of the links to enums in the javadocs. I've 
>> taken note 
>> of this.
>>
>> The javadocs are still a work in progress, so please let us 
>> know if you 
>> find any other problems or have any suggestions for them.
>>
>> -- Eskil
>>
>>
>>     
>
>
>   


Message 5 in thread

Romain Pokrzywka wrote:

>Many links from the online documentation are broken, e.g. on the QPushButton javadoc:
>
>http://doc.trolltech.com/qtjambi-1.0/gui/QPushButton.html
>
>All the links except those in the detailed description point to doc.trolltech.com/com/trolltech/ instead of
>doc.trolltech.com/qtjambi-1.0, for example the link for the constructor :
>
>http://doc.trolltech.com/com/trolltech/qt/gui/QPushButton.html#QPushButton()
>
>It's not that bad, since it's easy to adjust the URL, but I suppose Helge's problem is similar, albeit for the embedded javadoc.
>
>  
>
Hi, Romain.

The web version of the javadoc was broken, but it should be fixed now. 
The javadoc in the packages should have had the correct directory 
structure all along, though, so please report any broken links there.

-- Eskil


Message 6 in thread

Here's another error upon ctrl-Q on QGradient:



Helge


Romain Pokrzywka wrote:
>> The javadocs are still a work in progress, so please let us 
>> know if you 
>> find any other problems or have any suggestions for them.
>>     
>
> Many links from the online documentation are broken, e.g. on the QPushButton javadoc:
>
> http://doc.trolltech.com/qtjambi-1.0/gui/QPushButton.html
>
> All the links except those in the detailed description point to doc.trolltech.com/com/trolltech/ instead of
> doc.trolltech.com/qtjambi-1.0, for example the link for the constructor :
>
> http://doc.trolltech.com/com/trolltech/qt/gui/QPushButton.html#QPushButton()
>
> It's not that bad, since it's easy to adjust the URL, but I suppose Helge's problem is similar, albeit for the embedded javadoc.
>
> Cheers,
> Romain Pokrzywka 
> Software Engineer
> Klaralvdalens Datakonsult AB
>
> Nb: Thanks for the explanation on extending enums. Now it's all crystal-clear :-)
>
>   
>> -----Original Message-----
>> From: Eskil A. Blomfeldt [mailto:eblomfel@xxxxxxxxxxxxx] 
>> Sent: Friday, October 27, 2006 2:27 PM
>> To: Helge Fredriksen
>> Cc: qt-jambi-interest@xxxxxxxxxxxxx
>> Subject: Re: Problems upgrading...
>>
>> Hi, Helge!
>>
>> Helge Fredriksen wrote:
>>
>>     
>>> I've been upgrading to the 3rd version of your tech 
>>>       
>> preview. Finally 
>>     
>>> JavDoc! Great stuff!
>>> However, I have some problems in my code which naturally 
>>>       
>> arises since 
>>     
>>> you started using
>>> enums (great too) instead of integers.
>>>
>>> However, some integers flags are still there, how do I for instance 
>>> upgrade from
>>>
>>> QLabel.setFrameStyle(QFrame.Panel | QFrame.Raised);
>>>       
>> Indeed, setFrameStyle() also takes an int in the original C++ API, 
>> because it's a convenience function that takes values from several 
>> different enum types, so we can't make it type safe using the generic 
>> QFlags pattern.
>>
>> As for your question, the way to get the value of an enum in 
>> Qt Jambi is 
>> to call the value() method on the enum objects:
>>
>> label.setFrameStyle(QFrame.Shape.Panel.value() | 
>> QFrame.Shadow.Raised.value());
>>
>> or
>>
>> label.setFrameShape(QFrame.Shape.Panel);
>> label.setFrameShadow(QFrame.Shadow.Raised);
>>
>>     
>>> Also, I'm having a bit problems using Qtrl-Q in IntelliJ, sometimes 
>>> errors like this occurs:
>>>       
>> I'm not quite sure why this is happening, but there seems to be a 
>> problem with some of the links to enums in the javadocs. I've 
>> taken note 
>> of this.
>>
>> The javadocs are still a work in progress, so please let us 
>> know if you 
>> find any other problems or have any suggestions for them.
>>
>> -- Eskil
>>
>>
>>     
>
>
>