use the minimum width as default width

svn path=/trunk/KDE/kdebase/apps/; revision=692535
This commit is contained in:
Peter Penz 2007-07-25 19:51:33 +00:00
parent d1d31d8bee
commit be0e1f8d27
2 changed files with 10 additions and 0 deletions

View file

@ -102,6 +102,13 @@ InfoSidebarPage::~InfoSidebarPage()
{
}
QSize InfoSidebarPage::sizeHint() const
{
QSize size = SidebarPage::sizeHint();
size.setWidth(minimumSizeHint().width());
return size;
}
void InfoSidebarPage::setUrl(const KUrl& url)
{
if (url.isValid() && !m_shownUrl.equals(url, KUrl::CompareWithoutTrailingSlash)) {

View file

@ -51,6 +51,9 @@ public:
explicit InfoSidebarPage(QWidget* parent = 0);
virtual ~InfoSidebarPage();
/** @see QWidget::sizeHint() */
virtual QSize sizeHint() const;
public slots:
/** @see SidebarPage::setUrl() */
virtual void setUrl(const KUrl& url);