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

List:       kde-devel
Subject:    Re: KStatusBar only show once the widgets and text.
From:       Matt Rogers <mattr () kde ! org>
Date:       2005-12-11 4:31:08
Message-ID: 200512102231.08117.mattr () kde ! org
[Download RAW message or body]

On Saturday 10 December 2005 19:08, Michaƫl Larouche wrote:> I want to a progress \
bar in the status bar for a collection building(and> update). However, it just show \
once, the next time I call my method the> widget in the statusbar doesn't show at \
all.>> Here a fragment of code:> void KamefuMainWindow::buildComplete()> {>     \
kdDebug() << k_funcinfo << endl;>>     d->progressBuildCollection->setProgress(0);>>  \
statusBar()->removeWidget(d->progressBuildCollection);>     \
d->progressBuildCollection->hide();>     statusBar()->removeItem(0);>     \
statusBar()->clear();> }>> void KamefuMainWindow::buildCollection()> {>     kdDebug() \
<< k_funcinfo << "Building collection." << endl;>>     d->buildProgress = 0;>     \
d->totalItems = 0;>>     statusBar()->insertItem(i18n("Building collection..."), \
0);>>     statusBar()->addWidget(d->progressBuildCollection);>     \
d->progressBuildCollection->show();>>     // Fill KURL list with selected Directories \
from Preferences.>     KURL::List urlList;>     QStringList selectedDirectories => \
KamefuPreferences::self()->collectionDirectories();>     QStringList::const_iterator \
it;>     QStringList::const_iterator itEnd = selectedDirectories.end();>>     for( it \
= selectedDirectories.begin(); it != itEnd; ++it )>     {>         urlList.append( \
KURL(*it) );>     }>>     d->cBuilder->setDirectoryList( urlList );>> \
d->cBuilder->startBuild( KamefuPreferences::self()->collectionRecursive()> ); // \
recursive> }

all I can say is that KDevelop has a progress bar in it's status bar that works. You \
might see if you can dig around in the KDevelop source code for it.-- Matt >> Visit \
http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<


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

Configure | About | News | Add a list | Sponsored by KoreLogic