Results 1 to 5 of 5

Thread: How to add multiple strings to a spinner

  1. #1
    Join Date
    Jul 2011
    Posts
    81
    Thanks
    8
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Windows Symbian S60 Maemo/MeeGo

    Default How to add multiple strings to a spinner

    How to add 6 strings to a spinner

  2. #2
    Join Date
    Jul 2011
    Posts
    81
    Thanks
    8
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Windows Symbian S60 Maemo/MeeGo

    Default How to add multiple strings to a spinner

    I use 2 spinner to select the theme and categories of a game.
    I have 6themes(strings) for first spinner and 60categories(strings) for the second spinner.
    It worked but the problem is i cant give more than two string to a spinner.
    Is it possible to add more strings??
    I have used the following code:

    import Qt 4.7
    import "content"

    Rectangle {

    id:myrect

    width:330; height:125


    Row {
    y: 0; x:0; spacing: 20


    Image {
    id: image1
    source: "content/spinner-bgc.png"

    }

    }


    Row {
    y: 0; x: 7; spacing: 10

    Spinner {
    id: spinner1
    width:155; height: 125
    focus: true
    model: 6
    itemHeight: 30



    delegate: Text { font.pixelSize: 12; text:"Theme"; height: 30;font.bold:true;}

    }




    }
    Row {
    y: 0; x: 162; spacing: 20


    Image {
    id: image2
    source: "content/spinner-bgc.png"

    }

    }


    Row {
    y: 0; x:169; spacing: 20

    Spinner {
    id: spinner2
    width:155; height: 125
    focus: true
    model: 60
    itemHeight: 30
    delegate: Text { font.pixelSize:12; text: "Category"; height: 30;font.bold:true}

    }




    }
    Row {
    y: 0; x:324; spacing: 20


    Image {
    id: image3
    source: "content/spinner-bgc.png"

    }

    }

    }
    Thanks in advance

  3. #3
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: How to add multiple strings to a spinner

    What is a spinner?
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

  4. #4
    Join Date
    Oct 2010
    Location
    Berlin, Germany
    Posts
    358
    Thanks
    18
    Thanked 68 Times in 66 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: How to add multiple strings to a spinner

    Quote Originally Posted by high_flyer View Post
    What is a spinner?
    look into his other thread he created this morning. there is some code.

    edit: but please don't ask me what he is doing there. I have no idea. it's not c++...

  5. #5
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: How to add multiple strings to a spinner

    but please don't ask me what he is doing there. I have no idea. it's not c++...
    Its QML.

    .....................
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

  6. The following user says thank you to high_flyer for this useful post:

    FelixB (28th July 2011)

Similar Threads

  1. how to add multiple strings into the spinner
    By vinayaka in forum Qt Quick
    Replies: 3
    Last Post: 27th July 2011, 12:55
  2. Replies: 6
    Last Post: 22nd December 2010, 04:20
  3. Qmovie spinner.gif image Problem
    By pavanbarot in forum Qt Programming
    Replies: 0
    Last Post: 31st October 2010, 13:07
  4. Replies: 1
    Last Post: 7th May 2010, 16:01
  5. spinner (delay) button
    By addu in forum Qt Programming
    Replies: 3
    Last Post: 13th May 2009, 17:39

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.