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

List:       kde-devel
Subject:    KStatusBar only show once the widgets and text.
From:       Michaël_Larouche <michael.larouche () kdemail ! net>
Date:       2005-12-11 1:08:15
Message-ID: 200512102008.18482.michael.larouche () kdemail ! net
[Download RAW message or body]

[Attachment #2 (multipart/signed)]


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
}

-- 
Michaël Larouche (Shock The Dark Mage)
KDE developer working on Kopete, Kamefu...on dial-up :P
--------------------------------------
Blog: http://mlarouche.blogspot.com/
MSN/Email: michael.larouche@kdemail.net
IRC: irc.freenode.org/DarkShock on #kopete, #kde-devel, #kde4-devel, #plasma, 
#kamefu
Jabber: darkshock@myjabber.net, darkshock@linux-quebec.org, 
darkshock@gmail.com
AIM: darkshock19
Gadu-Gadu: 1172438
ICQ: 29644783
Yahoo: darkshock_TT

[Attachment #5 (application/pgp-signature)]

>> 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