Code maintenance for Qt 5:

- Added new options to retroshare-gui.pro for Qt 5
- Added new file QtVersion.h with macros to compile with Qt 4 and Qt 5
  - QHeaderView::setResizeMode -> QHeaderView::setSectionResizeMode
  - QHeaderView::setMovable -> QHeaderView::setSectionsMovable

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@6849 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
thunder2 2013-10-19 13:25:06 +00:00
parent 230caadb89
commit 6dbcc3e99b
18 changed files with 139 additions and 74 deletions

View file

@ -29,6 +29,7 @@
#include "PopularityDefs.h"
#include "gui/settings/rsharesettings.h"
#include "RSTreeWidgetItem.h"
#include "util/QtVersion.h"
#include <stdint.h>
@ -86,9 +87,9 @@ GroupTreeWidget::GroupTreeWidget(QWidget *parent) :
/* Set header resize modes and initial section sizes */
QHeaderView *header = ui->treeWidget->header ();
header->setResizeMode(COLUMN_NAME, QHeaderView::Stretch);
QHeaderView_setSectionResizeMode(header, COLUMN_NAME, QHeaderView::Stretch);
header->resizeSection(COLUMN_NAME, 170);
header->setResizeMode(COLUMN_POPULARITY, QHeaderView::Fixed);
QHeaderView_setSectionResizeMode(header, COLUMN_POPULARITY, QHeaderView::Fixed);
header->resizeSection(COLUMN_POPULARITY, 25);
/* add filter actions */