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

List:       pykde
Subject:    [PyKDE] Problems with QWidgetStack.raiseWidget()
From:       Jorge Godoy <godoy () ieee ! org>
Date:       2005-07-21 16:25:31
Message-ID: 87mzogazyc.fsf () jupiter ! g2ctech
[Download RAW message or body]


Hi,

I'm trying to write functions to cycle through the widgets created on a
widgetstack.  I can get their ID correctly, guess what the next widget's ID
should be but when I can the raiseWidget(int id) method it doesn't work.  A
code snippet with its output is included below, as well as program versions.
I appreciate any hints on what I might be doing wrong.

CODE:
--------------------------------------------------------------------------------
    def nextWidgetStack(self):
        print 'List:', self.widgetstacksList
        id = self.widgetStack1.id(self.widgetStack1.visibleWidget())
        pos = self.widgetstacksList.index(id)
        print 'Actual:', self.widgetstacksList[pos]
        try:
            next = self.widgetstacksList[pos + 1]
        except IndexError:
            next = self.widgetstacksList[0]
        print 'Next:', next
        print 'Widget Found:', self.widgetStack1.widget(next)
        self.widgetStack1.raiseWidget(next)
--------------------------------------------------------------------------------


OUTPUT (activated twice to show that nothing changes):
--------------------------------------------------------------------------------
List: [1, 2, 3]
Actual: 3
Next: 1
Widget Found: None
List: [1, 2, 3]
Actual: 3
Next: 1
Widget Found: None
--------------------------------------------------------------------------------


Versions:
   pyuic -version --> Python User Interface Compiler 3.13 for Qt version 3.3.4
   sip -V         --> 4.1.1 (4.1.1-255)

   >>> import qt
   >>> qt.qVersion()
   '3.3.4'
   >>>  


Expected behaviour:
   Having widget with ID 1 raised on the widgetstack.


Thanks in advance,
-- 
Jorge Godoy      <godoy@ieee.org>


_______________________________________________
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