From kde-devel Thu Mar 10 13:16:51 2005 From: Jaroslaw Staniek Date: Thu, 10 Mar 2005 13:16:51 +0000 To: kde-devel Subject: Re: KMdi horribly broken? Message-Id: <423048C3.2070606 () iidea ! pl> X-MARC-Message: https://marc.info/?l=kde-devel&m=111046063922202 Andreas Pakulat wrote: > could it be that getting a signal when a KMdiChildView looses focus > (i.e. I switch to another view in the tabbar) isn't possible? Actually > getting the lostFocus signal is fine, but when changing the view via > choosing another tab I get 2 activated and 2 lostFocus signals. Even > worse the KMdiChildview* parameter points to the same view everytime > the signal is emitted. > Is this expected behaviour? Then how can I disconnect from the old > view and reconnect to the new view, when chaning the view? (I mean > disconnect signals from slots of the view)? I tried to use > viewActivated and viewDeactivated from KMdiMainFrm, but only > viewActived is emitted when chaning the view (i.e. the slot connected > to viewDeactivated is never called). Then I tried with activated and > lostFocus of the KMdiChildView, but as I said above I never get a > lostFocus signal from the "old view". I don't want to dive into the > source of KMdi just to figure this out. I hope this is a bit related to you problems: In KexiDialogBase, I've reimpelmented KMdiChildView with KexiDialogBase and I am calling KMdiChildView::activate() when needed, look here: http://webcvs.kde.org/koffice/kexi/core/kexidialogbase.cpp?rev=1.108&view=markup Also look at KexiDialogBase::addView() - setting focus proxy can help with focusing. -- regards / pozdrawiam, Jaroslaw Staniek / OpenOffice Polska / Kexi Team Developers Wanted! http://www.kexi-project.org KDElibs/Win http://wiki.kde.org/tiki-index.php?page=KDElibs+for+win32 >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<