PDA

View Full Version : statusBar()->showMessage - causing jitter on status bar icons



mattigot
29th August 2012, 13:04
on my status bar i have a few buttons, i added them like this:


QPushButton* pb = new QPushButton(statusBar());

QPixmap pixmap(icon);//the file name of the icon
QIcon ButtonIcon(pixmap);
pb->setIcon(ButtonIcon);
QSize s(16,16);
pb->setIconSize(s);
QString tip(btnName);
pb->setToolTip(tip);
connect(pb, SIGNAL(clicked()), this, SLOT(statusBtnClicked()));
and later on i have an event onMouseMove, which basicly shows the mouse location on the status bar:

statusBar()->showMessage(moustlocationStr);
the buttons are displayed on the right side and the msg is on the left (by default) for some reason when i move the mouse and the msg of the mouse position changes, the left most icon jitters (moves a little bit to the side and quickly moves back to its place.)

i have no idea why.

any help?

Thank you.

Matt