I read your code.
The tool buttons are disappearing because thier sizeHint() and minuminSizeHint() are returning QSize(0,0) whcih is the default inherited from QWidget. QAbstractButton implements no sizeHint().
I suggest implementing minimumSizeHint() in TooButton to return the size of your pixmap. Then habd sizeHint() return that valut too so...
ToolButton::minimumSizeHint() const
{
return m_myPixmap.size(); //Or wheverever you are getting the pixmap from.
}
ToolButton::sizeHint() const
{
return minimumSizeHint();
}
--Justin Noel
justin@ics.com




Reply With Quote
Bookmarks