[prev in list] [next in list] [prev in thread] [next in thread]
List: pykde
Subject: Re: [PyKDE] noob: QtabWidget
From: Tina Isaksen <tina () bestemselv ! com>
Date: 2006-02-22 5:05:03
Message-ID: 43FBF0FF.6070802 () bestemselv ! com
[Download RAW message or body]
Andreas Pakulat wrote:
>To me it seems you have some problems translating the C++-docs to Python
>;-)
>
>
Very much so! I know next to nothing about C++
>
>
>>I have a tab widget and need to check what tab is the active one, so I have
>>tried (among other things):
>>
>>
>
>What exactly does that mean?
>
>
I have a QtabWidget with three pages (tabs) and needs to check what page
is the active one.
>
>
>>def doSaveMain(self):
>> if self.isTabEnabled(self.mainTabWidget * sources):
>>
>>
>
>This would call isTabEnabled on "self" which doesn't seems to be the
>QTabWidget. Thats the first problem, now the second is: You try to
>multiply the QTabWidget with the value of the variable sources.
>
>
Heh... trying with the '*' was a last desperate attempt because I could
not understand why one would need to multiply.
>
>If self.sources points to the widget it's even easier:
>
>if self.mainTabWidget.currentPage() == self.sources:
>
>
Thanks! Worked like a charm. And what's even better; after looking it
up in the assistant I actually understand it ;)
>The Qt docs are for C++, there "QWidget* w" means: The variable "w" has
>the type "pointer to QWidget". So the isTabEnabled function wants a
>QWidget instance as parameter and as it belongs to QTabWidget needs to
>be called on a QTabWidget instance (your mainTabWidget).
>
>
Thanks for the explanation. I'm having a hard time catching the C++ to
Python 'conversion' so this really helps. I really apreciate it.
Tina
_______________________________________________
PyKDE mailing list PyKDE@mats.imk.fraunhofer.de
http://mats.imk.fraunhofer.de/mailman/listinfo/pykde
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic