-rw-r--r-- | korganizer/kojournalview.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/korganizer/kojournalview.cpp b/korganizer/kojournalview.cpp index fae59d6..9e354d3 100644 --- a/korganizer/kojournalview.cpp +++ b/korganizer/kojournalview.cpp @@ -26,4 +26,5 @@ #include <qlayout.h> +#include <qscrollview.h> #include <qpopupmenu.h> @@ -44,5 +45,11 @@ KOJournalView::KOJournalView(Calendar *calendar, QWidget *parent, { mCalendar = calendar; - mTopLayout = new QVBoxLayout(this); + QScrollView * sv = new QScrollView( this ); + QHBoxLayout * hbl = new QHBoxLayout( this ); + hbl->addWidget( sv ); + parWid = new QWidget( sv->viewport() ); + sv->addChild(parWid); + sv->setResizePolicy( QScrollView:: AutoOneFit ); + mTopLayout = new QVBoxLayout(parWid); getNewEntry(); } @@ -58,5 +65,5 @@ int KOJournalView::currentDateCount() JournalEntry* KOJournalView::getNewEntry() { - JournalEntry* Entry = new JournalEntry(mCalendar,this); + JournalEntry* Entry = new JournalEntry(mCalendar,parWid); jEntries.append( Entry ); mTopLayout->addWidget(Entry); |