![]() |
2011-04-10
, 18:35
|
|
Posts: 417 |
Thanked: 200 times |
Joined on Apr 2010
@ Germany
|
#251
|
![]() |
2011-04-10
, 19:54
|
Posts: 291 |
Thanked: 398 times |
Joined on Jan 2011
@ USA
|
#252
|
Text { id: nvfText anchors.centerIn: dimmer font.pixelSize: largeFontSize font.bold: true color: "grey" horizontalAlignment: Text.AlignHCenter verticalAlignment: Text.AlignVCenter text: "No videos found" visible: false Timer { interval: 1000; running: true; onTriggered: nvfText.visible = (videoListModel.status == XmlListModel.Ready) && (videoList.count == 0) } }
The Following User Says Thank You to khuong For This Useful Post: | ||
![]() |
2011-04-10
, 20:05
|
|
Posts: 2,448 |
Thanked: 9,523 times |
Joined on Aug 2010
@ Wigan, UK
|
#253
|
@Marxian
Adding a timer to "No videos found" text seems to solve the problem. Work perfectly now!
Code:Text { id: nvfText anchors.centerIn: dimmer font.pixelSize: largeFontSize font.bold: true color: "grey" horizontalAlignment: Text.AlignHCenter verticalAlignment: Text.AlignVCenter text: "No videos found" visible: false Timer { interval: 1000; running: true; onTriggered: nvfText.visible = (videoListModel.status == XmlListModel.Ready) && (videoList.count == 0) } }
The Following User Says Thank You to marxian For This Useful Post: | ||
![]() |
2011-04-10
, 20:21
|
Posts: 291 |
Thanked: 398 times |
Joined on Jan 2011
@ USA
|
#254
|
That wouldn't work on a slow internet connection, since it would likely take longer than 1 second for the model to be in ready status. I will use a more robust solution when I get round to it.
![]() |
2011-04-10
, 20:25
|
|
Posts: 2,448 |
Thanked: 9,523 times |
Joined on Aug 2010
@ Wigan, UK
|
#255
|
model: VideoListModel { id: videoListModel onStatusChanged: { if (videoListModel.loaded && videoListModel.count == 0) { noResultsText.visible = true; } } }
![]() |
2011-04-10
, 21:10
|
Posts: 291 |
Thanked: 398 times |
Joined on Jan 2011
@ USA
|
#256
|
Text { id: noResultsText anchors.centerIn: dimmer font.pixelSize: largeFontSize font.bold: true color: "grey" horizontalAlignment: Text.AlignHCenter verticalAlignment: Text.AlignVCenter text: "No videos found" visible: false } model: VideoListModel { id: videoListModel onStatusChanged: { if (videoListModel.loaded && videoListModel.count == 0) { noResultsText.visible = true; } } }
![]() |
2011-04-10
, 21:14
|
Posts: 2,829 |
Thanked: 1,459 times |
Joined on Dec 2009
@ Finland
|
#257
|
That's because I have the ListView.SnapMode set to SnapToItem. When you stop scrolling, the view will adjust to ensure that the top of the first visible delegate is flush with the top of the view. It will not stop in the middle of a delegate.
Scrolling will not stop here:
Instead it will stop here:
![]() |
2011-04-10
, 21:24
|
Posts: 2,829 |
Thanked: 1,459 times |
Joined on Dec 2009
@ Finland
|
#259
|
![]() |
2011-04-10
, 21:30
|
Posts: 662 |
Thanked: 653 times |
Joined on Feb 2010
|
#260
|
The Following User Says Thank You to Reffyyyy For This Useful Post: | ||
![]() |
Tags |
cutetube, marxian = god, marxian legend, son of a gun, son of douche, son of fail, son of god, youtube |
|