Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Resetting a model can cause a crash in views with header/footer.
Geometry listeners were called for deleted header/footer. Change-Id: I47854178232f8a4ab5e19a931901b49741fec388 Reviewed-by: Bea Lam <bea.lam@nokia.com>
- Loading branch information
Martin Jones
authored and
Qt by Nokia
committed
Mar 19, 2012
1 parent
f079f78
commit 6deb3ce
Showing
8 changed files
with
261 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import QtQuick 2.0 | ||
|
||
GridView { | ||
id: view | ||
property bool horizontal: false | ||
property bool rtl: false | ||
width: 240 | ||
height: 320 | ||
|
||
model: testModel | ||
|
||
flow: horizontal ? GridView.TopToBottom : GridView.LeftToRight | ||
header: Rectangle { | ||
objectName: "header" | ||
width: horizontal ? 20 : view.width | ||
height: horizontal ? view.height : 20 | ||
color: "red" | ||
} | ||
footer: Rectangle { | ||
objectName: "footer" | ||
width: horizontal ? 30 : view.width | ||
height: horizontal ? view.height : 30 | ||
color: "blue" | ||
} | ||
|
||
cellWidth: 80; | ||
cellHeight: 80; | ||
|
||
delegate: Text { width: 80; height: 80; text: index + "(" + x + ")" } | ||
layoutDirection: rtl ? Qt.RightToLeft : Qt.LeftToRight | ||
} |
Oops, something went wrong.