[PyKDE] Newbie: Initiate
jbublitz at nwinternet.com
Sun Feb 12 05:37:53 GMT 2006
On Saturday 11 February 2006 18:39, 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()
> 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
Just call the slot that loads the data directly, as you would any other
function or method.
As long as all the necessary objects have been constructed and KApplication
has been instantiated, you shouldn't need to have the event loop running to
load the list box.
More information about the PyQt