Pagevideos: Create header object explicitly
authorWuzzy <Wuzzy2@mail.ru>
Thu, 18 Jul 2019 01:46:40 +0200
changeset 15271 8dd3602a4500
parent 15270 441bdf1e6026
child 15272 9be05ae1b726
Pagevideos: Create header object explicitly
QTfrontend/ui/page/pagevideos.cpp
--- a/QTfrontend/ui/page/pagevideos.cpp	Thu Jul 18 00:45:39 2019 +0200
+++ b/QTfrontend/ui/page/pagevideos.cpp	Thu Jul 18 01:46:40 2019 +0200
@@ -128,12 +128,14 @@
         filesTable->verticalHeader()->hide();
         filesTable->setMinimumWidth(400);
 
-        QHeaderView * header = filesTable->horizontalHeader();
+        QHeaderView * header = new QHeaderView(Qt::Horizontal, filesTable);
+        filesTable->setHorizontalHeader(header);
+        header = filesTable->horizontalHeader();
+        header->setStretchLastSection(true);
+        header->setSectionsClickable(false);
         header->setSectionResizeMode(vcName, QHeaderView::ResizeToContents);
         header->setSectionResizeMode(vcSize, QHeaderView::Fixed);
         header->resizeSection(vcSize, 100);
-        header->setStretchLastSection(true);
-        header->setSectionsClickable(false);
 
         btnOpenDir = new QPushButton(QPushButton::tr("Open videos directory"), pTableGroup);
         btnOpenDir->setWhatsThis(QPushButton::tr("Open the video directory in your system"));