Kdevelop / KStatusBar problem

John Gluck john.gluck at sympatico.ca
Sat May 12 03:12:18 BST 2001


Hi All

I'm having a problem changing the text in a status bar item...

I am using KDE 2.1.2  and Qt 2.3.0 along with Kdevelop 1.4.1  Everything
built from the source.

When I create the status bar, I show some text  As follows:

void KwedApp::initStatusBar()
{
  statusBar()->insertItem(i18n("Ready.     "), ID_STATUS_MSG, TRUE);
  statusBar()->setItemAlignment(ID_STATUS_MSG, AlignLeft);
  statusBar()->insertItem(i18n("No file    "), ID_FILE_TYPE, TRUE);
  statusBar()->setItemAlignment(ID_FILE_TYPE, AlignLeft);
  statusBar()->insertItem(i18n("0          "), ID_CURSOR_POS, TRUE);
  statusBar()->setItemAlignment(ID_CURSOR_POS, AlignLeft);
}

The above works and each status bar item shows the text as expected.
However, when I try to change the text ass follows:

// Display the currently open file in the status bar
//
void KwedApp::slotFileTypeMsg(const QString &text)
{
  statusBar()->changeItem(text, ID_FILE_TYPE);
}

It doesn't work. The text remains as originally set. If I pass a multi
line text string, the status bar resizes to fit the number of lines in
the text but the actual text doesn't change. I also know the text being
passed because I tried creating a KMessageBox to display the string as
well and that works fine.

Can some one help me figure out qhat I'm doing wrong.

Thanks

John


-
to unsubscribe from this list send an email to kdevelop-request at kdevelop.org with the following body:
unsubscribe »your-email-address«



More information about the KDevelop mailing list