[PyKDE] Newbie: Initiate

Mikhail Yarmish mike.spacer at gmail.com
Sun Feb 12 07:00:01 GMT 2006


Kuljo wrote:

>Hi Mikhail,
>thanks for your contribution. But I think, I did not
>described my problem clear enough:
>I have a kListBox1 which I want to fill with the names of
>the directories out of a higher level directory. For this
>purpose I have made a slot in the .ui.h file:
>
>    void MyBrain::listChapters()
>    {
>       
>self.kListBox1.insertStrList(listdir(getenv('HOME')+'/.mybrain'))
>    }
>
>Now, the problem is, how should I activate this slot (which
>works fine) without any user interaction so, that as soon as
>the form starts up the listbox is already filled with data.
>Sure, if I introduced a button and a connection e.g.
>
>    pushButton1 clicked() MyBrain listChapters()
>    
>it does work swell. But it is, what I don't want.
>I'm looking for a signal, which triggers this action
>earliest at the creating of the kListBox1 but latest the
>form is presented to the users.
>Kind regards Lajos
>
>
>
>___________________________________________________________________________
>Elégedetlen jelenlegi helyzetével, vagy csak egyszerűen váltani szeretne? Mi segítünk
>a választásban! Több mint 50 000 állás Európa szerte. - http://www.jobpilot.hu
>
>
>
>_______________________________________________
>PyKDE mailing list    PyKDE at mats.imk.fraunhofer.de
>http://mats.imk.fraunhofer.de/mailman/listinfo/pykde
>
>  
>
    Oh, now I see. I had the same problem and I used a little bit dirty 
solution. I called that function from languageChange(self) function 
which was created automaticly.
    Just put there something like self.listChapters(). If you find some 
more "clean" solution tell me it plz too =)




More information about the PyQt mailing list