on my status bar i have a few buttons, i added them like this:
QPixmap pixmap
(icon
);
//the file name of the icon QIcon ButtonIcon
(pixmap
);
pb->setIcon(ButtonIcon);
pb->setIconSize(s);
pb->setToolTip(tip);
connect(pb, SIGNAL(clicked()), this, SLOT(statusBtnClicked()));
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()));
To copy to clipboard, switch view to plain text mode
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
Bookmarks