Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Marco Bubke
flatpak-qt-creator
Commits
577057d2
Commit
577057d2
authored
Apr 16, 2010
by
Friedemann Kleint
Browse files
Welcome mode: Base on QScrollArea.
to able to scroll long lists again.
parent
21286690
Changes
5
Hide whitespace changes
Inline
Side-by-side
src/libs/utils/welcomemodetreewidget.cpp
View file @
577057d2
...
...
@@ -35,7 +35,6 @@
#include
<QtGui/QVBoxLayout>
#include
<QtGui/QMouseEvent>
#include
<QtGui/QResizeEvent>
#include
<QtGui/QImage>
enum
{
leftContentsMargin
=
2
,
topContentsMargin
=
2
,
...
...
@@ -241,14 +240,24 @@ WelcomeModeTreeWidgetPrivate::WelcomeModeTreeWidgetPrivate() :
itemLayout
(
new
QVBoxLayout
)
{
layout
->
setMargin
(
0
);
itemLayout
->
setMargin
(
0
);
}
WelcomeModeTreeWidget
::
WelcomeModeTreeWidget
(
QWidget
*
parent
)
:
Q
Widget
(
parent
),
m_d
(
new
WelcomeModeTreeWidgetPrivate
)
Q
ScrollArea
(
parent
),
m_d
(
new
WelcomeModeTreeWidgetPrivate
)
{
setLayout
(
m_d
->
layout
);
m_d
->
layout
->
addLayout
(
m_d
->
itemLayout
);
m_d
->
layout
->
addSpacerItem
(
new
QSpacerItem
(
0
,
0
,
QSizePolicy
::
Ignored
,
QSizePolicy
::
MinimumExpanding
));
QWidget
*
contents
=
new
QWidget
;
contents
->
setLayout
(
m_d
->
layout
);
viewport
()
->
setBackgroundRole
(
QPalette
::
Base
);
// Bright background.
setWidget
(
contents
);
setWidgetResizable
(
true
);
setVerticalScrollBarPolicy
(
Qt
::
ScrollBarAsNeeded
);
setHorizontalScrollBarPolicy
(
Qt
::
ScrollBarAlwaysOff
);
setFrameStyle
(
QFrame
::
NoFrame
);
setFrameShadow
(
QFrame
::
Plain
);
setContentsMargins
(
0
,
0
,
0
,
0
);
}
WelcomeModeTreeWidget
::~
WelcomeModeTreeWidget
()
...
...
src/libs/utils/welcomemodetreewidget.h
View file @
577057d2
...
...
@@ -32,7 +32,7 @@
#include
"utils_global.h"
#include
<QtGui/Q
TreeWidget
>
#include
<QtGui/Q
ScrollArea
>
#include
<QtGui/QLabel>
namespace
Utils
{
...
...
@@ -53,7 +53,7 @@ private:
};
// WelcomeModeTreeWidget: Show an itemized list with arrows and emits a signal on click.
class
QTCREATOR_UTILS_EXPORT
WelcomeModeTreeWidget
:
public
Q
Widget
class
QTCREATOR_UTILS_EXPORT
WelcomeModeTreeWidget
:
public
Q
ScrollArea
{
Q_OBJECT
public:
...
...
src/plugins/projectexplorer/projectwelcomepagewidget.ui
View file @
577057d2
...
...
@@ -166,7 +166,7 @@
<customwidgets>
<customwidget>
<class>
Utils::WelcomeModeTreeWidget
</class>
<extends>
Q
Widget
</extends>
<extends>
Q
ScrollArea
</extends>
<header
location=
"global"
>
utils/welcomemodetreewidget.h
</header>
</customwidget>
<customwidget>
...
...
src/plugins/qt4projectmanager/gettingstartedwelcomepagewidget.ui
View file @
577057d2
...
...
@@ -340,7 +340,7 @@
<customwidgets>
<customwidget>
<class>
Utils::WelcomeModeTreeWidget
</class>
<extends>
Q
Widget
</extends>
<extends>
Q
ScrollArea
</extends>
<header
location=
"global"
>
utils/welcomemodetreewidget.h
</header>
</customwidget>
<customwidget>
...
...
src/plugins/welcome/communitywelcomepagewidget.ui
View file @
577057d2
...
...
@@ -105,7 +105,7 @@
<customwidgets>
<customwidget>
<class>
Utils::WelcomeModeTreeWidget
</class>
<extends>
Q
Widget
</extends>
<extends>
Q
ScrollArea
</extends>
<header
location=
"global"
>
utils/welcomemodetreewidget.h
</header>
</customwidget>
<customwidget>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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