Results 1 to 1 of 1

Thread: Problems with positioners

  1. #1
    Join Date
    Dec 2011
    Posts
    9
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Maemo/MeeGo

    Default Problems with positioners

    Hi,
    I've got some problems with positioners:
    My code is
    Qt Code:
    1. import QtQuick 1.1
    2. import com.nokia.meego 1.0
    3.  
    4. Page
    5. {
    6. // property int items: 5
    7. // property int itemheight: screenheight / items - screenheight
    8. id: mainPage
    9. tools: maintoolbar
    10.  
    11. Loader
    12. {
    13. id: goLoader
    14. onLoaded: console.log("Show lyrics page loaded")
    15. }
    16. Loader
    17. {
    18. id: selectTrackLoader
    19. onLoaded: console.log("Select track page loaded")
    20. }
    21.  
    22. EditTrackDataSheet
    23. {
    24. id: edittrackdatasheet
    25. }
    26.  
    27. Column
    28. {
    29. width: parent.width
    30. Rectangle
    31. {
    32. color: "#4591ff"
    33. height: 72
    34. width: parent.width
    35. Text
    36. {
    37. text: "Search for lyrics"
    38. color: "white"
    39. anchors
    40. {
    41. verticalCenter: parent.verticalCenter
    42. left: parent.left
    43. leftMargin: 30
    44. }
    45. font.pixelSize: 48
    46. }
    47. }
    48.  
    49. CheckBox
    50. {
    51. id: tracksrc
    52. text: "Select track from library" // label isn't needed with PageStackWindow
    53. checked: true
    54. anchors.horizontalCenter: parent.horizontalCenter
    55. //checkable: true
    56. }
    57.  
    58. // button for selecting a track from the media library
    59. Row
    60. {
    61. Text
    62. {
    63. id: selectedtracktext
    64. text: "Selected track: "
    65. }
    66.  
    67. Button
    68. {
    69. id: selecttrack
    70. checkable: false
    71. text: "<i>No track selected</i>"
    72. width: parent.width - selectedtracktext.width
    73. onClicked:
    74. {
    75. if ( tracksrc.checked )
    76. {
    77. selectTrackLoader.source = "SelectTrackPage.qml"
    78. pageStack.push(selectTrackLoader.item)
    79. }
    80. else
    81. {
    82. edittrackdatasheet.open()
    83. }
    84. }
    85. }
    86. }
    87.  
    88. //line edits for entering the data manually
    89.  
    90. Button
    91. {
    92. id: lyricssrcbutton
    93. text: lyricssrcdialog.model.get(lyricssrcdialog.selectedIndex).name
    94. width: parent.width
    95. onClicked: { lyricssrcdialog.open(); }
    96. }
    97.  
    98. Button
    99. {
    100. id: go
    101. text: "Go!"
    102. width: parent.width
    103. onClicked:
    104. {
    105. goLoader.source = "ShowLyricsPage.qml"
    106. pageStack.push(goLoader.item)
    107. }
    108. }
    109. }
    110. ToolBarLayout
    111. {
    112. id: maintoolbar
    113. ToolIcon
    114. {
    115. iconId: "toolbar-back"
    116. onClicked: quitdialog.open()
    117. }
    118. }
    119. SelectionDialog
    120. {
    121. id: lyricssrcdialog
    122. titleText: "Download source"
    123. selectedIndex: 0
    124. model: ListModel
    125. {
    126. ListElement { name: "AZLyrics" }
    127. }
    128. }
    129.  
    130. QueryDialog
    131. {
    132. id: notimplementeddialog
    133. acceptButtonText: "OK"
    134. message: "Sorry! Not implemented yet!"
    135. }
    136.  
    137. QueryDialog
    138. {
    139. id: quitdialog
    140. acceptButtonText: "OK"
    141. rejectButtonText: "Cancel"
    142. message: "Are you sure you want to quit MaeLyrica?"
    143. onAccepted: Qt.quit()
    144. }
    145.  
    146. }
    To copy to clipboard, switch view to plain text mode 

    Unfortunately, the Row is positioned somewhere in the top (as in screenshot) and should be below the checkbox.
    What am I doing wrong?
    Thanks in advance
    Attached Images Attached Images
    Last edited by marmistrz; 17th July 2012 at 16:03.

Similar Threads

  1. Replies: 2
    Last Post: 23rd July 2010, 15:53
  2. Problems with s60
    By emrares in forum Qt for Embedded and Mobile
    Replies: 1
    Last Post: 8th January 2010, 12:23
  3. Ssl problems
    By Unplugged in forum Newbie
    Replies: 3
    Last Post: 4th October 2007, 08:02
  4. Problems using a DLL
    By prosass in forum Newbie
    Replies: 7
    Last Post: 6th March 2007, 18:45
  5. QT4 Plugins - problems, problems
    By NormanDunbar in forum Qt Programming
    Replies: 6
    Last Post: 9th May 2006, 16:39

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.