From 8827510ec55eda169340b5414bd60eb3ba3bfb79 Mon Sep 17 00:00:00 2001 From: Arno Date: Sun, 23 May 2010 11:03:14 +0200 Subject: Bugfix: margins in ListEditor Fix layout of AddMovieWizard. The ListEditor-Widget must have margins set to 0 to be laid out properly in a QWizardPage. --- addmoviewizard.cpp | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) (limited to 'addmoviewizard.cpp') diff --git a/addmoviewizard.cpp b/addmoviewizard.cpp index 3855b81..b7dfbf2 100644 --- a/addmoviewizard.cpp +++ b/addmoviewizard.cpp @@ -132,8 +132,6 @@ MovieActorPage::MovieActorPage(QWidget *parent) : QWizardPage(parent){ mActorWidget = new ActorWidget; mainLayout->addWidget(mActorWidget); QVBoxLayout *actorEditorLayout = new QVBoxLayout; - QLabel *l1 = new QLabel(" "); - actorEditorLayout->addWidget(l1); ListEditor *actorsEditor = new ListEditor(ListModelSingleton::instance()->model("actor")); actorEditorLayout->addWidget(actorsEditor); actorEditorLayout->addStretch(); @@ -155,28 +153,22 @@ MovieGenrePage::MovieGenrePage(QWidget *parent) : QWizardPage(parent){ setSubTitle(tr("Set the genre of the movie")); setPixmap(QWizard::LogoPixmap, QPixmap(":/shemov.png")); - QVBoxLayout *selectionLayout = new QVBoxLayout; + QVBoxLayout *mainLayout = new QVBoxLayout; QLabel *l1 = new QLabel(tr("Select genre")); - selectionLayout->addWidget(l1); + mainLayout->addWidget(l1); mGenre = new QComboBox; mGenre->setModel(ListModelSingleton::instance()->model("genre")); int idx = mGenre->findText("shemale"); if(idx != -1){ mGenre->setCurrentIndex(idx); } - selectionLayout->addWidget(mGenre); - selectionLayout->addStretch(); + mainLayout->addWidget(mGenre); - QVBoxLayout *editorLayout = new QVBoxLayout; ListEditor *genreEditor = new ListEditor(ListModelSingleton::instance()->model("genre")); - editorLayout->addWidget(genreEditor); - editorLayout->addStretch(); + mainLayout->addWidget(genreEditor); + mainLayout->addStretch(); registerField("genre", mGenre, "currentText"); - QHBoxLayout *mainLayout = new QHBoxLayout; - mainLayout->addLayout(selectionLayout); - mainLayout->addStretch(); - mainLayout->addLayout(editorLayout); setLayout(mainLayout); } -- cgit v1.2.3-70-g09d2