Skip to content

Commit

Permalink
some debug info for the resize issue
Browse files Browse the repository at this point in the history
  • Loading branch information
alediaferia committed Sep 18, 2008
1 parent 8c3f53a commit a14d5dd
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
12 changes: 11 additions & 1 deletion view/raptorgraphicswidget.cpp
Expand Up @@ -18,6 +18,7 @@
// Qt
#include <QGraphicsLinearLayout>
#include <QGraphicsProxyWidget>
#include <QGraphicsSceneResizeEvent>

// KDE
#include <KDesktopFile>
Expand Down Expand Up @@ -104,7 +105,6 @@ QSizeF RaptorGraphicsWidget::sizeHint(Qt::SizeHint which, const QSizeF & constra
kDebug()<<"hint"<<d->view->sizeHint();
kDebug()<<"maximum"<<d->view->maximumSize();
kDebug()<<"current"<<this->size().toSize();
kDebug()<<"constraint"<<constraint;

switch (which) {
case Qt::MinimumSize :
Expand All @@ -121,3 +121,13 @@ QSizeF RaptorGraphicsWidget::sizeHint(Qt::SizeHint which, const QSizeF & constra

return size;
}

void RaptorGraphicsWidget::resizeEvent(QGraphicsSceneResizeEvent *event)
{
kDebug()<<"oldSize"<<event->oldSize();
kDebug()<<"newSize"<<event->newSize();
kDebug()<<"preferredSize"<<preferredSize();
kDebug()<<"maximumHeight"<<maximumHeight();

QGraphicsWidget::resizeEvent(event);
}
1 change: 1 addition & 0 deletions view/raptorgraphicswidget.h
Expand Up @@ -24,6 +24,7 @@ class RaptorGraphicsWidget : public QGraphicsWidget

protected:
QSizeF sizeHint(Qt::SizeHint which, const QSizeF &constraint = QSizeF() ) const;
void resizeEvent(QGraphicsSceneResizeEvent *event);

protected slots:
void updateColors();
Expand Down

0 comments on commit a14d5dd

Please sign in to comment.