comparison filestatuswidget.cpp @ 101:f9af5e93de0e

* Layout fix
author Chris Cannam
date Wed, 24 Nov 2010 19:57:30 +0000
parents 0dc7305acbc8
children f70ccc15c9d0
comparison
equal deleted inserted replaced
100:0dc7305acbc8 101:f9af5e93de0e
70 "have appeared since your most recent commit or update."); 70 "have appeared since your most recent commit or update.");
71 71
72 for (int i = int(FileStates::FirstState); 72 for (int i = int(FileStates::FirstState);
73 i <= int(FileStates::LastState); ++i) { 73 i <= int(FileStates::LastState); ++i) {
74 74
75 layout->addItem(new QSpacerItem(5, 8), ++row, 0);
76
77 FileStates::State s = FileStates::State(i); 75 FileStates::State s = FileStates::State(i);
78 76
79 QWidget *box = new QWidget; 77 QWidget *box = new QWidget;
80 QGridLayout *boxlayout = new QGridLayout; 78 QGridLayout *boxlayout = new QGridLayout;
81 boxlayout->setMargin(0); 79 boxlayout->setMargin(0);
82 box->setLayout(boxlayout); 80 box->setLayout(boxlayout);
83 81
84 boxlayout->addWidget(new QLabel(labelFor(s)), 0, 0); 82 boxlayout->addItem(new QSpacerItem(5, 8), 0, 0);
83
84 boxlayout->addWidget(new QLabel(labelFor(s)), 1, 0);
85 85
86 QListWidget *w = new QListWidget; 86 QListWidget *w = new QListWidget;
87 m_stateListMap[s] = w; 87 m_stateListMap[s] = w;
88 w->setSelectionMode(QListWidget::ExtendedSelection); 88 w->setSelectionMode(QListWidget::ExtendedSelection);
89 boxlayout->addWidget(w, 1, 0); 89 boxlayout->addWidget(w, 2, 0);
90 90
91 connect(w, SIGNAL(itemSelectionChanged()), 91 connect(w, SIGNAL(itemSelectionChanged()),
92 this, SLOT(itemSelectionChanged())); 92 this, SLOT(itemSelectionChanged()));
93 93
94 layout->addWidget(box, ++row, 0, 1, 2); 94 layout->addWidget(box, ++row, 0, 1, 2);