Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
CamiTK
CamiTK Community Edition
Commits
256116e7
Commit
256116e7
authored
Mar 10, 2016
by
saubatn
Browse files
UPDATED Compilation library-qtpropertybrowser ok with Qt5.
parent
efd64156
Changes
11
Expand all
Hide whitespace changes
Inline
Side-by-side
sdk/libraries/qtpropertybrowser/CMakeLists.txt
View file @
256116e7
...
...
@@ -18,6 +18,10 @@ set(CMAKE_AUTOMOC OFF)
find_package
(
Qt5 COMPONENTS Core Gui Xml XmlPatterns Widgets Help UiTools OpenGL OpenGLExtensions REQUIRED
)
if
(
Qt5_FOUND
)
message
(
STATUS
"QtPropertyBrowser : found Qt
${
Qt5_VERSION
}
."
)
set
(
QT_INCLUDE_DIRS
${
Qt5Widgets_INCLUDE_DIRS
}
${
Qt5Core_INCLUDE_DIRS
}
${
Qt5Gui_INCLUDE_DIRS
}
${
Qt5Xml_INCLUDE_DIRS
}
${
Qt5XmlPatterns_INCLUDE_DIRS
}
${
Qt5Declarative_INCLUDE_DIRS
}
${
Qt5Help_INCLUDE_DIRS
}
${
Qt5UiTools_INCLUDE_DIRS
}
${
Qt5OpenGL_INCLUDE_DIRS
}
${
Qt5OpenGLExtensions_INCLUDE_DIRS
}
)
include_directories
(
${
QT_INCLUDE_DIRS
}
)
set
(
QT_LIBRARIES
${
Qt5Core_LIBRARIES
}
${
Qt5Gui_LIBRARIES
}
${
Qt5Xml_LIBRARIES
}
${
Qt5XmlPatterns_LIBRARIES
}
${
Qt5Declarative_LIBRARIES
}
${
Qt5Help_LIBRARIES
}
${
Qt5UiTools_LIBRARIES
}
${
Qt5OpenGL_LIBRARIES
}
${
Qt5OpenGLExtensions_LIBRARIES
}
${
Qt5Widgets_LIBRARIES
}
)
message
(
WARNING
"QT_LIBRARIES =
${
QT_LIBRARIES
}
"
)
else
()
message
(
SEND_ERROR
"Failed to find Qt 5.x. This is needed by QtPropertyBrowser."
)
endif
()
...
...
@@ -144,7 +148,12 @@ camitk_library(SHARED
HEADERS_TO_INSTALL
${
HEADERS_H
}
${
HEADERS_UPPERCASE
}
CEP_NAME SDK
DESCRIPTION
"Allows displaying and editing Qt Meta Object properties. Used to display component properties. This library is required."
)
)
qt5_use_modules
(
${
LIBRARY_TARGET_NAME
}
Core Gui Xml XmlPatterns Widgets Help UiTools OpenGL OpenGLExtensions
)
# Add Qt5 link libraries at link stage
#target_link_libraries(${LIB_NAME} ${QT_LIBRARIES})
# Recursively update the shiboken path variable containing the CamiTK SDK tree structure
set
(
SHIBOKEN_CAMITK_SDK_PATH
${
SHIBOKEN_CAMITK_SDK_PATH
}
:
${
CMAKE_CURRENT_SOURCE_DIR
}
CACHE INTERNAL
""
)
...
...
sdk/libraries/qtpropertybrowser/src/qtbuttonpropertybrowser.cpp
View file @
256116e7
...
...
@@ -39,13 +39,13 @@
#include "qtbuttonpropertybrowser.h"
#include <
QtCore/
QSet>
#include <
QtGui/
QGridLayout>
#include <
QtGui/
QLabel>
#include <
QtCore/
QTimer>
#include <
QtCore/
QMap>
#include <
QtGui/
QToolButton>
#include <
QtGui/
QStyle>
#include <QSet>
#include <QGridLayout>
#include <QLabel>
#include <QTimer>
#include <QMap>
#include <QToolButton>
#include <QStyle>
#if QT_VERSION >= 0x040400
QT_BEGIN_NAMESPACE
...
...
sdk/libraries/qtpropertybrowser/src/qteditorfactory.cpp
View file @
256116e7
...
...
@@ -37,27 +37,29 @@
**
****************************************************************************/
// Qt4 -> Qt5
#define Q_TYPENAME typename
#include "qteditorfactory.h"
#include "qtpropertybrowserutils_p.h"
#include <
QtGui/
QSpinBox>
#include <
QtGui/
QScrollBar>
#include <
QtGui/
QComboBox>
#include <
QtGui/
QAbstractItemView>
#include <
QtGui/
QLineEdit>
#include <
QtGui/
QDateTimeEdit>
#include <
QtGui/
QHBoxLayout>
#include <
QtGui/
QMenu>
#include <
QtGui/
QKeyEvent>
#include <
QtGui/
QApplication>
#include <
QtGui/
QLabel>
#include <
QtGui/
QToolButton>
#include <
QtGui/
QColorDialog>
#include <
QtGui/
QFontDialog>
#include <
QtGui/
QSpacerItem>
#include <
QtGui/
QStyleOption>
#include <
QtGui/
QPainter>
#include <
QtCore/
QMap>
#include <QSpinBox>
#include <QScrollBar>
#include <QComboBox>
#include <QAbstractItemView>
#include <QLineEdit>
#include <QDateTimeEdit>
#include <QHBoxLayout>
#include <QMenu>
#include <QKeyEvent>
#include <QApplication>
#include <QLabel>
#include <QToolButton>
#include <QColorDialog>
#include <QFontDialog>
#include <QSpacerItem>
#include <QStyleOption>
#include <QPainter>
#include <QMap>
#if defined(Q_CC_MSVC)
# pragma warning(disable: 4786)
/* MS VS 6: truncating debug info after 255 characters */
...
...
sdk/libraries/qtpropertybrowser/src/qtgroupboxpropertybrowser.cpp
View file @
256116e7
...
...
@@ -39,12 +39,12 @@
#include "qtgroupboxpropertybrowser.h"
#include <
QtCore/
QSet>
#include <
QtGui/
QGridLayout>
#include <
QtGui/
QLabel>
#include <
QtGui/
QGroupBox>
#include <
QtCore/
QTimer>
#include <
QtCore/
QMap>
#include <QSet>
#include <QGridLayout>
#include <QLabel>
#include <QGroupBox>
#include <QTimer>
#include <QMap>
#if QT_VERSION >= 0x040400
QT_BEGIN_NAMESPACE
...
...
sdk/libraries/qtpropertybrowser/src/qtpropertybrowser.cpp
View file @
256116e7
...
...
@@ -39,10 +39,10 @@
#include "qtpropertybrowser.h"
#include <
QtCore/
QSet>
#include <
QtCore/
QMap>
#include <
QtGui/
QIcon>
#include <
QtGui/
QLineEdit>
#include <QSet>
#include <QMap>
#include <QIcon>
#include <QLineEdit>
#if defined(Q_CC_MSVC)
# pragma warning(disable: 4786)
/* MS VS 6: truncating debug info after 255 characters */
...
...
sdk/libraries/qtpropertybrowser/src/qtpropertybrowser.h
View file @
256116e7
...
...
@@ -41,9 +41,9 @@
#ifndef QTPROPERTYBROWSER_H
#define QTPROPERTYBROWSER_H
#include <Qt
Gui
/QWidget>
#include <
QtCore/
QSet>
#include <Qt
Gui
/QLineEdit>
#include <Qt
Widgets
/QWidget>
#include <QSet>
#include <Qt
Widgets
/QLineEdit>
#if QT_VERSION >= 0x040400
QT_BEGIN_NAMESPACE
...
...
sdk/libraries/qtpropertybrowser/src/qtpropertybrowserutils.cpp
View file @
256116e7
...
...
@@ -39,58 +39,39 @@
#include "qtpropertybrowserutils_p.h"
#include <
QtGui/
QApplication>
#include <
QtGui/
QPainter>
#include <
QtGui/
QHBoxLayout>
#include <
QtGui/
QMouseEvent>
#include <
QtGui/
QCheckBox>
#include <
QtGui/
QLineEdit>
#include <
QtGui/
QMenu>
#include <
QtGui/
QStyleOption>
#include <QApplication>
#include <QPainter>
#include <QHBoxLayout>
#include <QMouseEvent>
#include <QCheckBox>
#include <QLineEdit>
#include <QMenu>
#include <QStyleOption>
#if QT_VERSION >= 0x040400
QT_BEGIN_NAMESPACE
#endif
QtCursorDatabase
::
QtCursorDatabase
()
{
appendCursor
(
Qt
::
ArrowCursor
,
QApplication
::
translate
(
"QtCursorDatabase"
,
"Arrow"
,
0
,
QApplication
::
UnicodeUTF8
),
QIcon
(
QLatin1String
(
":/trolltech/qtpropertybrowser/images/cursor-arrow.png"
)));
appendCursor
(
Qt
::
UpArrowCursor
,
QApplication
::
translate
(
"QtCursorDatabase"
,
"Up Arrow"
,
0
,
QApplication
::
UnicodeUTF8
),
QIcon
(
QLatin1String
(
":/trolltech/qtpropertybrowser/images/cursor-uparrow.png"
)));
appendCursor
(
Qt
::
CrossCursor
,
QApplication
::
translate
(
"QtCursorDatabase"
,
"Cross"
,
0
,
QApplication
::
UnicodeUTF8
),
QIcon
(
QLatin1String
(
":/trolltech/qtpropertybrowser/images/cursor-cross.png"
)));
appendCursor
(
Qt
::
WaitCursor
,
QApplication
::
translate
(
"QtCursorDatabase"
,
"Wait"
,
0
,
QApplication
::
UnicodeUTF8
),
QIcon
(
QLatin1String
(
":/trolltech/qtpropertybrowser/images/cursor-wait.png"
)));
appendCursor
(
Qt
::
IBeamCursor
,
QApplication
::
translate
(
"QtCursorDatabase"
,
"IBeam"
,
0
,
QApplication
::
UnicodeUTF8
),
QIcon
(
QLatin1String
(
":/trolltech/qtpropertybrowser/images/cursor-ibeam.png"
)));
appendCursor
(
Qt
::
SizeVerCursor
,
QApplication
::
translate
(
"QtCursorDatabase"
,
"Size Vertical"
,
0
,
QApplication
::
UnicodeUTF8
),
QIcon
(
QLatin1String
(
":/trolltech/qtpropertybrowser/images/cursor-sizev.png"
)));
appendCursor
(
Qt
::
SizeHorCursor
,
QApplication
::
translate
(
"QtCursorDatabase"
,
"Size Horizontal"
,
0
,
QApplication
::
UnicodeUTF8
),
QIcon
(
QLatin1String
(
":/trolltech/qtpropertybrowser/images/cursor-sizeh.png"
)));
appendCursor
(
Qt
::
SizeFDiagCursor
,
QApplication
::
translate
(
"QtCursorDatabase"
,
"Size Backslash"
,
0
,
QApplication
::
UnicodeUTF8
),
QIcon
(
QLatin1String
(
":/trolltech/qtpropertybrowser/images/cursor-sizef.png"
)));
appendCursor
(
Qt
::
SizeBDiagCursor
,
QApplication
::
translate
(
"QtCursorDatabase"
,
"Size Slash"
,
0
,
QApplication
::
UnicodeUTF8
),
QIcon
(
QLatin1String
(
":/trolltech/qtpropertybrowser/images/cursor-sizeb.png"
)));
appendCursor
(
Qt
::
SizeAllCursor
,
QApplication
::
translate
(
"QtCursorDatabase"
,
"Size All"
,
0
,
QApplication
::
UnicodeUTF8
),
QIcon
(
QLatin1String
(
":/trolltech/qtpropertybrowser/images/cursor-sizeall.png"
)));
appendCursor
(
Qt
::
BlankCursor
,
QApplication
::
translate
(
"QtCursorDatabase"
,
"Blank"
,
0
,
QApplication
::
UnicodeUTF8
),
QIcon
());
appendCursor
(
Qt
::
SplitVCursor
,
QApplication
::
translate
(
"QtCursorDatabase"
,
"Split Vertical"
,
0
,
QApplication
::
UnicodeUTF8
),
QIcon
(
QLatin1String
(
":/trolltech/qtpropertybrowser/images/cursor-vsplit.png"
)));
appendCursor
(
Qt
::
SplitHCursor
,
QApplication
::
translate
(
"QtCursorDatabase"
,
"Split Horizontal"
,
0
,
QApplication
::
UnicodeUTF8
),
QIcon
(
QLatin1String
(
":/trolltech/qtpropertybrowser/images/cursor-hsplit.png"
)));
appendCursor
(
Qt
::
PointingHandCursor
,
QApplication
::
translate
(
"QtCursorDatabase"
,
"Pointing Hand"
,
0
,
QApplication
::
UnicodeUTF8
),
QIcon
(
QLatin1String
(
":/trolltech/qtpropertybrowser/images/cursor-hand.png"
)));
appendCursor
(
Qt
::
ForbiddenCursor
,
QApplication
::
translate
(
"QtCursorDatabase"
,
"Forbidden"
,
0
,
QApplication
::
UnicodeUTF8
),
QIcon
(
QLatin1String
(
":/trolltech/qtpropertybrowser/images/cursor-forbidden.png"
)));
appendCursor
(
Qt
::
OpenHandCursor
,
QApplication
::
translate
(
"QtCursorDatabase"
,
"Open Hand"
,
0
,
QApplication
::
UnicodeUTF8
),
QIcon
(
QLatin1String
(
":/trolltech/qtpropertybrowser/images/cursor-openhand.png"
)));
appendCursor
(
Qt
::
ClosedHandCursor
,
QApplication
::
translate
(
"QtCursorDatabase"
,
"Closed Hand"
,
0
,
QApplication
::
UnicodeUTF8
),
QIcon
(
QLatin1String
(
":/trolltech/qtpropertybrowser/images/cursor-closedhand.png"
)));
appendCursor
(
Qt
::
WhatsThisCursor
,
QApplication
::
translate
(
"QtCursorDatabase"
,
"What's This"
,
0
,
QApplication
::
UnicodeUTF8
),
QIcon
(
QLatin1String
(
":/trolltech/qtpropertybrowser/images/cursor-whatsthis.png"
)));
appendCursor
(
Qt
::
BusyCursor
,
QApplication
::
translate
(
"QtCursorDatabase"
,
"Busy"
,
0
,
QApplication
::
UnicodeUTF8
),
QIcon
(
QLatin1String
(
":/trolltech/qtpropertybrowser/images/cursor-busy.png"
)));
appendCursor
(
Qt
::
ArrowCursor
,
QApplication
::
translate
(
"QtCursorDatabase"
,
"Arrow"
,
0
),
QIcon
(
QLatin1String
(
":/trolltech/qtpropertybrowser/images/cursor-arrow.png"
)));
appendCursor
(
Qt
::
UpArrowCursor
,
QApplication
::
translate
(
"QtCursorDatabase"
,
"Up Arrow"
,
0
),
QIcon
(
QLatin1String
(
":/trolltech/qtpropertybrowser/images/cursor-uparrow.png"
)));
appendCursor
(
Qt
::
CrossCursor
,
QApplication
::
translate
(
"QtCursorDatabase"
,
"Cross"
,
0
),
QIcon
(
QLatin1String
(
":/trolltech/qtpropertybrowser/images/cursor-cross.png"
)));
appendCursor
(
Qt
::
WaitCursor
,
QApplication
::
translate
(
"QtCursorDatabase"
,
"Wait"
,
0
),
QIcon
(
QLatin1String
(
":/trolltech/qtpropertybrowser/images/cursor-wait.png"
)));
appendCursor
(
Qt
::
IBeamCursor
,
QApplication
::
translate
(
"QtCursorDatabase"
,
"IBeam"
,
0
),
QIcon
(
QLatin1String
(
":/trolltech/qtpropertybrowser/images/cursor-ibeam.png"
)));
appendCursor
(
Qt
::
SizeVerCursor
,
QApplication
::
translate
(
"QtCursorDatabase"
,
"Size Vertical"
,
0
),
QIcon
(
QLatin1String
(
":/trolltech/qtpropertybrowser/images/cursor-sizev.png"
)));
appendCursor
(
Qt
::
SizeHorCursor
,
QApplication
::
translate
(
"QtCursorDatabase"
,
"Size Horizontal"
,
0
),
QIcon
(
QLatin1String
(
":/trolltech/qtpropertybrowser/images/cursor-sizeh.png"
)));
appendCursor
(
Qt
::
SizeFDiagCursor
,
QApplication
::
translate
(
"QtCursorDatabase"
,
"Size Backslash"
,
0
),
QIcon
(
QLatin1String
(
":/trolltech/qtpropertybrowser/images/cursor-sizef.png"
)));
appendCursor
(
Qt
::
SizeBDiagCursor
,
QApplication
::
translate
(
"QtCursorDatabase"
,
"Size Slash"
,
0
),
QIcon
(
QLatin1String
(
":/trolltech/qtpropertybrowser/images/cursor-sizeb.png"
)));
appendCursor
(
Qt
::
SizeAllCursor
,
QApplication
::
translate
(
"QtCursorDatabase"
,
"Size All"
,
0
),
QIcon
(
QLatin1String
(
":/trolltech/qtpropertybrowser/images/cursor-sizeall.png"
)));
appendCursor
(
Qt
::
BlankCursor
,
QApplication
::
translate
(
"QtCursorDatabase"
,
"Blank"
,
0
),
QIcon
());
appendCursor
(
Qt
::
SplitVCursor
,
QApplication
::
translate
(
"QtCursorDatabase"
,
"Split Vertical"
,
0
),
QIcon
(
QLatin1String
(
":/trolltech/qtpropertybrowser/images/cursor-vsplit.png"
)));
appendCursor
(
Qt
::
SplitHCursor
,
QApplication
::
translate
(
"QtCursorDatabase"
,
"Split Horizontal"
,
0
),
QIcon
(
QLatin1String
(
":/trolltech/qtpropertybrowser/images/cursor-hsplit.png"
)));
appendCursor
(
Qt
::
PointingHandCursor
,
QApplication
::
translate
(
"QtCursorDatabase"
,
"Pointing Hand"
,
0
),
QIcon
(
QLatin1String
(
":/trolltech/qtpropertybrowser/images/cursor-hand.png"
)));
appendCursor
(
Qt
::
ForbiddenCursor
,
QApplication
::
translate
(
"QtCursorDatabase"
,
"Forbidden"
,
0
),
QIcon
(
QLatin1String
(
":/trolltech/qtpropertybrowser/images/cursor-forbidden.png"
)));
appendCursor
(
Qt
::
OpenHandCursor
,
QApplication
::
translate
(
"QtCursorDatabase"
,
"Open Hand"
,
0
),
QIcon
(
QLatin1String
(
":/trolltech/qtpropertybrowser/images/cursor-openhand.png"
)));
appendCursor
(
Qt
::
ClosedHandCursor
,
QApplication
::
translate
(
"QtCursorDatabase"
,
"Closed Hand"
,
0
),
QIcon
(
QLatin1String
(
":/trolltech/qtpropertybrowser/images/cursor-closedhand.png"
)));
appendCursor
(
Qt
::
WhatsThisCursor
,
QApplication
::
translate
(
"QtCursorDatabase"
,
"What's This"
,
0
),
QIcon
(
QLatin1String
(
":/trolltech/qtpropertybrowser/images/cursor-whatsthis.png"
)));
appendCursor
(
Qt
::
BusyCursor
,
QApplication
::
translate
(
"QtCursorDatabase"
,
"Busy"
,
0
),
QIcon
(
QLatin1String
(
":/trolltech/qtpropertybrowser/images/cursor-busy.png"
)));
}
void
QtCursorDatabase
::
appendCursor
(
Qt
::
CursorShape
shape
,
const
QString
&
name
,
const
QIcon
&
icon
)
{
...
...
@@ -164,7 +145,7 @@ QIcon QtPropertyBrowserUtils::brushValueIcon(const QBrush &b) {
}
QString
QtPropertyBrowserUtils
::
colorValueText
(
const
QColor
&
c
)
{
return
QApplication
::
translate
(
"QtPropertyBrowserUtils"
,
"[%1, %2, %3] (%4)"
,
0
,
QApplication
::
UnicodeUTF8
)
return
QApplication
::
translate
(
"QtPropertyBrowserUtils"
,
"[%1, %2, %3] (%4)"
,
0
)
.
arg
(
QString
::
number
(
c
.
red
()))
.
arg
(
QString
::
number
(
c
.
green
()))
.
arg
(
QString
::
number
(
c
.
blue
()))
...
...
@@ -191,7 +172,7 @@ QIcon QtPropertyBrowserUtils::fontValueIcon(const QFont &f) {
}
QString
QtPropertyBrowserUtils
::
fontValueText
(
const
QFont
&
f
)
{
return
QApplication
::
translate
(
"QtPropertyBrowserUtils"
,
"[%1, %2]"
,
0
,
QApplication
::
UnicodeUTF8
)
return
QApplication
::
translate
(
"QtPropertyBrowserUtils"
,
"[%1, %2]"
,
0
)
.
arg
(
f
.
family
())
.
arg
(
f
.
pointSize
());
}
...
...
sdk/libraries/qtpropertybrowser/src/qtpropertybrowserutils_p.h
View file @
256116e7
...
...
@@ -52,10 +52,10 @@
#ifndef QTPROPERTYBROWSERUTILS_H
#define QTPROPERTYBROWSERUTILS_H
#include <
QtCore/
QMap>
#include <
QtGui/
QIcon>
#include <
QtGui/
QWidget>
#include <
QtCore/
QStringList>
#include <QMap>
#include <QIcon>
#include <QWidget>
#include <QStringList>
#if QT_VERSION >= 0x040400
QT_BEGIN_NAMESPACE
...
...
sdk/libraries/qtpropertybrowser/src/qtpropertymanager.cpp
View file @
256116e7
...
...
@@ -37,24 +37,26 @@
**
****************************************************************************/
// Qt4 -> Qt5
#define Q_TYPENAME typename
#include "qtpropertymanager.h"
#include "qtpropertybrowserutils_p.h"
#include <
QtCore/
QDateTime>
#include <
QtCore/
QLocale>
#include <
QtCore/
QMap>
#include <
QtCore/
QTimer>
#include <
QtGui/
QIcon>
#include <
QtCore/
QMetaEnum>
#include <
QtGui/
QFontDatabase>
#include <
QtGui/
QStyleOption>
#include <
QtGui/
QStyle>
#include <
QtGui/
QApplication>
#include <
QtGui/
QPainter>
#include <
QtGui/
QLabel>
#include <
QtGui/
QVector3D>
#include <
QtGui/
QCheckBox>
#include <
QtGui/
QLineEdit>
#include <QDateTime>
#include <QLocale>
#include <QMap>
#include <QTimer>
#include <QIcon>
#include <QMetaEnum>
#include <QFontDatabase>
#include <QStyleOption>
#include <QStyle>
#include <QApplication>
#include <QPainter>
#include <QLabel>
#include <QVector3D>
#include <QCheckBox>
#include <QLineEdit>
#include <limits.h>
#include <float.h>
...
...
sdk/libraries/qtpropertybrowser/src/qttreepropertybrowser.cpp
View file @
256116e7
...
...
@@ -39,17 +39,17 @@
#include "qttreepropertybrowser.h"
#include <
QtCore/
QSet>
#include <
QtGui/
QIcon>
#include <
QtGui/
QTreeWidget>
#include <
QtGui/
QItemDelegate>
#include <
QtGui/
QHBoxLayout>
#include <
QtGui/
QHeaderView>
#include <
QtGui/
QPainter>
#include <
QtGui/
QApplication>
#include <
QtGui/
QFocusEvent>
#include <
QtGui/
QStyle>
#include <
QtGui/
QPalette>
#include <QSet>
#include <QIcon>
#include <QTreeWidget>
#include <QItemDelegate>
#include <QHBoxLayout>
#include <QHeaderView>
#include <QPainter>
#include <QApplication>
#include <QFocusEvent>
#include <QStyle>
#include <QPalette>
#if QT_VERSION >= 0x040400
QT_BEGIN_NAMESPACE
...
...
@@ -463,16 +463,17 @@ void QtTreePropertyBrowserPrivate::init(QWidget *parent) {
m_treeWidget
->
setColumnCount
(
2
);
QStringList
labels
;
labels
.
append
(
QApplication
::
translate
(
"QtTreePropertyBrowser"
,
"Property"
,
0
,
QApplication
::
UnicodeUTF8
));
labels
.
append
(
QApplication
::
translate
(
"QtTreePropertyBrowser"
,
"Value"
,
0
,
QApplication
::
UnicodeUTF8
));
labels
.
append
(
QApplication
::
translate
(
"QtTreePropertyBrowser"
,
"Property"
,
0
));
labels
.
append
(
QApplication
::
translate
(
"QtTreePropertyBrowser"
,
"Value"
,
0
));
m_treeWidget
->
setHeaderLabels
(
labels
);
m_treeWidget
->
setAlternatingRowColors
(
true
);
m_treeWidget
->
setEditTriggers
(
QAbstractItemView
::
EditKeyPressed
);
m_delegate
=
new
QtPropertyEditorDelegate
(
parent
);
m_delegate
->
setEditorPrivate
(
this
);
m_treeWidget
->
setItemDelegate
(
m_delegate
);
m_treeWidget
->
header
()
->
setMovable
(
false
);
m_treeWidget
->
header
()
->
setResizeMode
(
QHeaderView
::
Stretch
);
// Deprecated in Qt5
/* m_treeWidget->header()->setMovable(false);
m_treeWidget->header()->setResizeMode(QHeaderView::Stretch);*/
m_expandIcon
=
drawIndicatorIcon
(
q_ptr
->
palette
(),
q_ptr
->
style
());
...
...
@@ -860,7 +861,8 @@ void QtTreePropertyBrowser::setResizeMode(QtTreePropertyBrowser::ResizeMode mode
m
=
QHeaderView
::
Stretch
;
break
;
}
d_ptr
->
m_treeWidget
->
header
()
->
setResizeMode
(
m
);
// deprecated in Qt5
//d_ptr->m_treeWidget->header()->setResizeMode(m);
}
/*!
...
...
sdk/libraries/qtpropertybrowser/src/qtvariantproperty.cpp
View file @
256116e7
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment