Changeset View
Changeset View
Standalone View
Standalone View
src/widget/tableview/KexiTableScrollAreaHeader.cpp
Show First 20 Lines • Show All 289 Lines • ▼ Show 20 Line(s) | 286 | if (isSortIndicatorShown()) { | |||
---|---|---|---|---|---|
290 | else | 290 | else | ||
291 | size.rheight() += size.width() + margin; | 291 | size.rheight() += size.width() + margin; | ||
292 | //qDebug() << "margin" << margin; | 292 | //qDebug() << "margin" << margin; | ||
293 | } | 293 | } | ||
294 | //qDebug() << size << "---"; | 294 | //qDebug() << size << "---"; | ||
295 | //qDebug() << orientation() << logicalIndex << s; | 295 | //qDebug() << orientation() << logicalIndex << s; | ||
296 | if (orientation() == Qt::Horizontal) { | 296 | if (orientation() == Qt::Horizontal) { | ||
297 | KDbTableViewData *data = scrollArea()->data(); | 297 | KDbTableViewData *data = scrollArea()->data(); | ||
298 | KDbTableViewColumn *col = data->visibleColumn(logicalIndex); | 298 | KDbTableViewColumn *col = data ? data->visibleColumn(logicalIndex) : nullptr; | ||
299 | if (col && col->width() > 0) { | 299 | if (col && col->width() > 0) { | ||
300 | size.setWidth(col->width()); | 300 | size.setWidth(col->width()); | ||
301 | } | 301 | } | ||
302 | } | 302 | } | ||
303 | return size; | 303 | return size; | ||
304 | } | 304 | } | ||
305 | 305 | | |||
306 | QSize KexiTableScrollAreaHeader::sizeHint() const | 306 | QSize KexiTableScrollAreaHeader::sizeHint() const | ||
Show All 38 Lines |