Hi Henrik,

               I got that working fine., the problem seems to be with the 
Column width. In the below mails examples which I had given., I didn't use 
width property with column, that was causing the problem.

Column {

        id: optionscolumn

        spacing: 2

        width: 110    ------------>>>>> is required ( i wonder why height is 
not considered, taking optionrect*optionslist.count into consideration )

        anchors.top: parent.top

        anchors.topMargin: 0

        anchors.left:parent.left

        anchors.leftMargin:5

        Repeater {

            model: optionslist

            Rectangle {

                id: optionrect

                width: parent.width

                height: 25

                color: "#ebebeb"

                border.color: "#e1e1e1"

                Image {

                    id: icon

                    x: 6

                    y: 5

                    width: 5

                    height: 5

                    anchors.top: parent.top

                    anchors.topMargin: 5

                    smooth: true

                    fillMode: "PreserveAspectFit"

                    anchors.left: parent.left

                    anchors.leftMargin: 5

                    source: icon

                }

            }

        }

    }

}

Hope, width would by default made equal to = parent.width for Column if it 
isn't predefined.

cheers,
Rakesh.M

________________________________
From: [email protected] [mailto:[email protected]]
Sent: Thursday, April 29, 2010 6:07 PM
To: Mutharaju Rakesh
Cc: [email protected]
Subject: Re: [Qt-qml] Repeater element missing the border between the items

Hi Rakesh,

could you provide complete qml snippets that can be easily used to reproduce? 
And, if you find a bug I suggest you log them at

   http://bugreports.qt.nokia.com/browse/QTBUG

<http://bugreports.qt.nokia.com/browse/QTBUG>using component 'Declarative'.

Thanks :)

Henrik

On Apr 21, 2010, at 11:29 AM, ext 
[email protected]<mailto:[email protected]> wrote:

Another observation if use the same code as Row as (horizontal alignment) the 
borders are shown and rectangle color is also shown. But I have the problem 
with Column still.
-rakesh

________________________________
From: [email protected]<mailto:[email protected]> 
[mailto:[email protected]] On Behalf Of 
[email protected]<mailto:[email protected]>
Sent: Wednesday, April 21, 2010 9:19 AM
To: [email protected]<mailto:[email protected]>; 
[email protected]<mailto:[email protected]>; 
[email protected]<mailto:[email protected]>
Subject: Re: [Qt-qml] Repeater element missing the border between the items

Hi,

     I tried the "spacing" property., something strange happening in my system.

Column {

                    spacing: 20

                    Repeater {.,

                    }

        }



I don't see the color code set in the rectangle (not even the interior color) 
neither the border, and clearly there is a spacing between the elements.

For, better visual effect I have changed the border color to "#ff0000" red



I am aware that border space is part of rectangle. background color is shown 
instead.


I am using Qt Creator 1.3.83 Based on Qt 4.7.0(32 bit) built on Apr 8 2010 at 
02:09:07

seems like a bug

Br,
Rakesh

________________________________
From: [email protected]<mailto:[email protected]> 
[mailto:[email protected]] On Behalf Of 
[email protected]<mailto:[email protected]>
Sent: Tuesday, April 20, 2010 11:25 AM
To: [email protected]<mailto:[email protected]>; 
[email protected]<mailto:[email protected]>
Subject: Re: [Qt-qml] Repeater element missing the border between the items

Hi,

Like Alan this works fine for me - the border is definitely visible.  Perhaps 
you are using an older version that might have a bug?

Cheers,

Aaron


On 20/04/10 6:22 PM, ""Alpert (Nokia-D-Qt/Brisbane)"" 
<[email protected]<UrlBlockedError.aspx>> wrote:



 Tirsdag 20. april 2010 18:08:06 skrev ext 
[email protected]<UrlBlockedError.aspx> :
> Hi,
>
>         I have a similar type of list content, instead of rewriting them
> for n-number of times I used Repeater element, I noticed that the border
> or seperator between the items is lost.
>
> For eg.,
>
>                 Rectangle {
>                     id: myitemrect1
>                     x: 0
>                     y: 536
>                     width: parent.width
>                     height: 70
>                     color: "#babec1"
>                     border.color: "#7e7e7e"
>                     anchors.top: parent.top
>                     anchors.topMargin: 0
>                     Text {
>                         id: text13
>                         x: 46
>                         y: 20
>                         width: 255
>                         height: 40
>                         text: "item1"
>                         verticalAlignment: "AlignVCenter"
>                         anchors.top: parent.top
>                         anchors.topMargin: 15
>                         anchors.left: parent.left
>                         anchors.leftMargin: 50
>                         font.pointSize: 20
>                         font.bold: false
>                         font.family: "FreeSans"
>                     }
>                 }
>                 Rectangle {
>                     id: myitemrect2
>                     x: 0
>                     y: 591
>                     width: parent.width
>                     height: 70
>                     color: "#babec1"
>                     anchors.top: myitemrect1.bottom
>                     anchors.topMargin: 0
>                     border.color: "#7e7e7e"
>                     Text {
>                         id: text14
>                         x: 48
>                         y: 600
>                         width: 255
>                         height: 40
>                         text: "item2"
>                         anchors.top: parent.top
>                         anchors.topMargin: 15
>                         font.bold: false
>                         font.family: "FreeSans"
>                         font.pointSize: 20
>                         anchors.leftMargin: 50
>                         verticalAlignment: "AlignVCenter"
>                         anchors.left: parent.left
>                     }
>                 }
> ..
>
> Above, code shows the border and works as expected. I replaced the above
> code with Repeater element like.,
>
>                 Column {
>                     Repeater {
>                         model:8
>                         Rectangle {
>                             id: myitem
>                             x: 0
>                             y: 536
>                             width: parent.width
>                             height: 70
>                             color: "#babec1"
>                             border.color: "#7e7e7e"
>                             border.width: 5  --------------->>>>>> I tried
> increasing the width, even then border is not visible. Text {
>                                 id: text13
>                                 x: 46
>                                 y: 20
>                                 width: 255
>                                 height: 38
>                                 text: "item"+index
>                                 verticalAlignment: "AlignVCenter"
>                                 anchors.left: parent.left
>                                 anchors.leftMargin: 50
>                                 font.pointSize: 20
>                                 font.bold: false
>                                 font.family: "FreeSans"
>                             }
>                         }
>                     }
>                 }
>
> Now, the border between the items is lost. Is there possibility to show the
> border if I use Repeater element? Thanks and Regards,
> Rakesh

I don't see anything wrong with the result of that code. Keep in mind that the
border width is not added to the Rectangle's width. This means that since you
don't specify any spacing on the Column, the rectangles will be drawn
overlapping. Adding spacing equal to the border width would allow the full
borders to be shown.

--
Alan Alpert
Software Engineer
Nokia, Qt Development Frameworks
_______________________________________________
Qt-qml mailing list
[email protected]<UrlBlockedError.aspx>
http://lists.trolltech.com/mailman/listinfo/qt-qml

<ATT00001..txt>


/*
Henrik Hartz, Senior Qt Product Manager
Qt Development, Nokia
*/

_______________________________________________
Qt-qml mailing list
[email protected]
http://lists.trolltech.com/mailman/listinfo/qt-qml

Reply via email to