mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-21 23:40:26 -04:00
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:
parent
230caadb89
commit
6dbcc3e99b
18 changed files with 139 additions and 74 deletions
|
@ -48,6 +48,7 @@
|
|||
#include "StatusDefs.h"
|
||||
#include "util/misc.h"
|
||||
#include "vmessagebox.h"
|
||||
#include "util/QtVersion.h"
|
||||
|
||||
#include "gui/connect/ConnectProgressDialog.h"
|
||||
|
||||
|
@ -283,13 +284,13 @@ void FriendList::initializeHeader(bool afterLoadSettings)
|
|||
{
|
||||
// set column size
|
||||
QHeaderView *header = ui->peerTreeWidget->header();
|
||||
header->setMovable(true);
|
||||
//header->setResizeMode(COLUMN_NAME, QHeaderView::Stretch);
|
||||
header->setResizeMode(COLUMN_NAME, QHeaderView::Interactive);
|
||||
header->setResizeMode(COLUMN_STATE, QHeaderView::Interactive);
|
||||
header->setResizeMode(COLUMN_LAST_CONTACT, QHeaderView::Interactive);
|
||||
header->setResizeMode(COLUMN_IP, QHeaderView::Interactive);
|
||||
header->setResizeMode(COLUMN_AVATAR, QHeaderView::Fixed);
|
||||
QHeaderView_setSectionsMovable(header, true);
|
||||
//QHeaderView_setSectionResizeMode(header, COLUMN_NAME, QHeaderView::Stretch);
|
||||
QHeaderView_setSectionResizeMode(header, COLUMN_NAME, QHeaderView::Interactive);
|
||||
QHeaderView_setSectionResizeMode(header, COLUMN_STATE, QHeaderView::Interactive);
|
||||
QHeaderView_setSectionResizeMode(header, COLUMN_LAST_CONTACT, QHeaderView::Interactive);
|
||||
QHeaderView_setSectionResizeMode(header, COLUMN_IP, QHeaderView::Interactive);
|
||||
QHeaderView_setSectionResizeMode(header, COLUMN_AVATAR, QHeaderView::Fixed);
|
||||
|
||||
/* if (!afterLoadSettings) {
|
||||
header->resizeSection(COLUMN_NAME, 150);
|
||||
|
|
|
@ -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 */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue