Reply
Thread Tools
Posts: 241 | Thanked: 324 times | Joined on Dec 2010
#11
This so weird! I had that exact same code (except for the column part), and my searchbox kept shrinking. Is the SDK buggy at times or something? I restarted my pc and now it works. That's rather peculiar. Thanks a lot btw, greatly appreciate the time you took to reply to my posts

I tried putting the column and the header dissappeared and the searchbox went halfway off the screen at the top. I replaced Nextelement with a red rectangle similar to the header. Very unexpected results

Last edited by hotnikkelz; 2012-03-31 at 14:52.
 
Posts: 241 | Thanked: 324 times | Joined on Dec 2010
#12
My battles continue
I think the mingw 4 4 emulator is finicky. For example I was playing with xmllistmodel and list view, to pull an xml from tvrage's api feed and the results were ugly. The xml has 2 results to list, it only lists one result, and it just puts huge ugly text on the screen without following the general theme of the device. Seems like i really gotta wait till I get my N9 to really play with this stuff

Code:
Page {
    tools: commonTools

    Label {
        id: label
        anchors.centerIn: parent
        text: qsTr("Hello world!")
        visible: false
    }

    Rectangle {
        id: header
        height: 72
        width: parent.width
        color: "light blue"


            TextField {
                  id: search
                  placeholderText: "Search"
                  maximumLength: 80
                  anchors.centerIn: parent
                  width: 448
                }
            Rectangle {
                  id: nextBox
                  anchors.top: header.bottom
                  height: 72
                  width: header.width
                  color: "teal"
                }
            XmlListModel{
                  id: data
                  source: "http://services.tvrage.com/feeds/search.php?show=buffy"
                  query: "/Results/show"

                  XmlRole {name: "name"; query: "name/string()"}
                  XmlRole {name: "country"; query: "country/string()"}
                  XmlRole {name: "seasons"; query: "seasons/string()"}
            }
            ListView {
                 width:50 ; height: 12
                 model: data
                 delegate: Text { text: name}
                 anchors.top: nextBox.bottom

             }
           }

        }
 
qwazix's Avatar
Moderator | Posts: 2,622 | Thanked: 5,447 times | Joined on Jan 2010
#13
Originally Posted by hotnikkelz View Post
This so weird! I had that exact same code (except for the column part), and my searchbox kept shrinking. Is the SDK buggy at times or something? I restarted my pc and now it works. That's rather peculiar. Thanks a lot btw, greatly appreciate the time you took to reply to my posts

I tried putting the column and the header dissappeared and the searchbox went halfway off the screen at the top. I replaced Nextelement with a red rectangle similar to the header. Very unexpected results
That is because I forgot to specify width and height for the column. Add
Code:
anchors.fill : parent
and it should be fixed. I've got to go, I will check your latest post later see if I can help
__________________
Proud coding competition 2012 winner: ρcam
My other apps: speedcrunch N9 N900 Jolla –– contactlaunch –– timenow

Nemo UX blog: Grog
My website: qwazix.com
My job: oob
 
Reply

Thread Tools

 
Forum Jump


All times are GMT. The time now is 04:30.