![]() |
2012-06-26
, 16:11
|
Posts: 324 |
Thanked: 371 times |
Joined on Dec 2009
@ Vancouver, BC
|
#2
|
The Following User Says Thank You to Slocan For This Useful Post: | ||
![]() |
2012-06-27
, 15:28
|
Posts: 3,328 |
Thanked: 4,476 times |
Joined on May 2011
@ Poland
|
#4
|
import QtQuick 1.0 import org.maemo.fremantle 1.0 Rectangle { property color fontcolor: "white" Column { id: c1 Row { width: parent.width CheckBox { id: tracksrc //text: "Select track from library" checked: true //checkable: true } Label { id: tracksrcText text: "Select track from library" anchors.verticalCenter: tracksrc.verticalCenter color: fontcolor } } Label { id: selecttracklabel text: "Selected track" color: fontcolor } Button { id: selecttrack text: "No track selected" checkable: false width: parent.width } } Rectangle { id: r1 anchors.top: c1.bottom SelectionDialog { id: lyricssrcdialog titleText: "Download source" selectedIndex: 0 model: ListModel { ListElement { name: "AZLyrics" } } } Button { id: lyricssrcbutton text: lyricssrcdialog.model.get(lyricssrcdialog.selectedIndex).name width: parent.width onClicked: { lyricssrcdialog.open(); } } } Column { id: c2 anchors.top: r1.bottom Button { id: go text: "Go!" width: parent.width } } }
import QtQuick 1.0 import org.maemo.fremantle 1.0 Column { property color fontcolor: "white" Row { width: parent.width CheckBox { id: tracksrc //text: "Select track from library" checked: true //checkable: true } Label { id: tracksrcText text: "Select track from library" anchors.verticalCenter: tracksrc.verticalCenter color: fontcolor } } Label { id: selecttracklabel text: "Selected track" color: fontcolor } Button { id: selecttrack text: "No track selected" checkable: false width: parent.width } SelectionDialog { id: lyricssrcdialog titleText: "Download source" selectedIndex: 0 model: ListModel { ListElement { name: "AZLyrics" } } } Button { id: lyricssrcbutton text: lyricssrcdialog.model.get(lyricssrcdialog.selectedIndex).name width: parent.width onClicked: { lyricssrcdialog.open(); } } Button { id: go text: "Go!" width: parent.width } }
![]() |
2012-06-27
, 15:41
|
Posts: 1,313 |
Thanked: 2,978 times |
Joined on Jun 2011
@ Finland
|
#5
|
then it's showing up alright, but throwing that load of loops detected as before. Where should I move the selection dialog?
Item { Column { property color fontcolor: "white" Row { width: parent.width CheckBox { id: tracksrc //text: "Select track from library" checked: true //checkable: true } Label { id: tracksrcText text: "Select track from library" anchors.verticalCenter: tracksrc.verticalCenter color: fontcolor } } Label { id: selecttracklabel text: "Selected track" color: fontcolor } Button { id: selecttrack text: "No track selected" checkable: false width: parent.width } Button { id: lyricssrcbutton text: lyricssrcdialog.model.get(lyricssrcdialog.selectedIndex).name width: parent.width onClicked: { lyricssrcdialog.open(); } } Button { id: go text: "Go!" width: parent.width } } SelectionDialog { id: lyricssrcdialog titleText: "Download source" selectedIndex: 0 model: ListModel { ListElement { name: "AZLyrics" } } } }
The Following User Says Thank You to ajalkane For This Useful Post: | ||
![]() |
2012-06-29
, 15:33
|
Posts: 3,328 |
Thanked: 4,476 times |
Joined on May 2011
@ Poland
|
#6
|
Perhaps like this (notice I wrapped Column inside Item):
Code:Item { Column { property color fontcolor: "white" Row { width: parent.width CheckBox { id: tracksrc //text: "Select track from library" checked: true //checkable: true } Label { id: tracksrcText text: "Select track from library" anchors.verticalCenter: tracksrc.verticalCenter color: fontcolor } } Label { id: selecttracklabel text: "Selected track" color: fontcolor } Button { id: selecttrack text: "No track selected" checkable: false width: parent.width } Button { id: lyricssrcbutton text: lyricssrcdialog.model.get(lyricssrcdialog.selectedIndex).name width: parent.width onClicked: { lyricssrcdialog.open(); } } Button { id: go text: "Go!" width: parent.width } } SelectionDialog { id: lyricssrcdialog titleText: "Download source" selectedIndex: 0 model: ListModel { ListElement { name: "AZLyrics" } } } }
import QtQuick 1.0 import org.maemo.fremantle 1.0 Item { Loader { id: goloader onLoaded: console.log("Go! clicked") } Loader { id: selecttrackloader onLoaded: console.log("Select track view loaded") } Column { property color fontcolor: "white" Row { width: parent.width CheckBox { id: tracksrc //text: "Select track from library" checked: true //checkable: true } Label { id: tracksrcText text: "Select track from library" anchors.verticalCenter: tracksrc.verticalCenter color: fontcolor } } Label { id: selecttracklabel text: "Selected track" color: fontcolor } Button { id: selecttrack text: "No track selected" checkable: false width: parent.width onClicked: { } } Button { id: lyricssrcbutton text: lyricssrcdialog.model.get(lyricssrcdialog.selectedIndex).name width: parent.width onClicked: { lyricssrcdialog.open(); } } Button { id: go text: "Go!" width: parent.width } } SelectionDialog { id: lyricssrcdialog titleText: "Download source" selectedIndex: 0 model: ListModel { ListElement { name: "AZLyrics" } } } }
.../main.qml:53 ReferenceError: Can't find variable fontcolor .../main.qml:45 ReferenceError: Can't find variable fontcolor
![]() |
2012-07-03
, 06:55
|
Posts: 1,313 |
Thanked: 2,978 times |
Joined on Jun 2011
@ Finland
|
#7
|
With this code:
[CODE]
I'm getting
What am I doing wrong?Code:.../main.qml:53 ReferenceError: Can't find variable fontcolor .../main.qml:45 ReferenceError: Can't find variable fontcolor
The Following User Says Thank You to ajalkane For This Useful Post: | ||
![]() |
2012-07-03
, 11:25
|
Posts: 3,328 |
Thanked: 4,476 times |
Joined on May 2011
@ Poland
|
#8
|
![]() |
2012-07-03
, 11:53
|
Posts: 1,313 |
Thanked: 2,978 times |
Joined on Jun 2011
@ Finland
|
#9
|
That way there are no errors, but still somehow only blank screen is painted..
The Following User Says Thank You to ajalkane For This Useful Post: | ||
![]() |
2012-07-03
, 12:08
|
Posts: 3,328 |
Thanked: 4,476 times |
Joined on May 2011
@ Poland
|
#10
|
I'm learning QML.
My code is:
I want the lyricssrcbutton to display the currently selected option.
Why isn't it working. What's the problem with the loops?
Thanks in advance.
If you want to support my work, you can donate by PayPal or Flattr
Projects no longer actively developed: here
Last edited by marmistrz; 2012-07-13 at 09:04.