×

Discussion Board

Results 1 to 7 of 7

Thread: QML and Slider

  1. #1
    Registered User
    Join Date
    Oct 2012
    Posts
    21

    QML and Slider

    How can I put a slider in my QML code? I do not see any options for buttons, sliders etc.. at all in the design part and if I try with code etc..

    slider{
    ...
    }

    It does not compile. Which headers do I need to include?

    Thanks.

  2. #2
    Nokia Developer Champion
    Join Date
    Jun 2008
    Location
    Noida,India
    Posts
    3,956

  3. #3
    Registered User
    Join Date
    Oct 2012
    Posts
    21

    Re: QML and Slider

    Yes, I have seen that but the trouble is that it does not work.

    The error message is:

    Slider is not a type
    Slider {

  4. #4
    Nokia Developer Champion
    Join Date
    Jun 2008
    Location
    Noida,India
    Posts
    3,956

    Re: QML and Slider

    try including this, if not already there:

    import QtQuick 1.0 or import QtQuick 1.1

  5. #5
    Registered User
    Join Date
    Oct 2012
    Posts
    21

    Re: QML and Slider

    I have got both of those. What about the .pro file? Do I need anything special there?

  6. #6
    Super Contributor
    Join Date
    Jun 2006
    Location
    India
    Posts
    3,037

    Re: QML and Slider

    Quote Originally Posted by mark090480 View Post
    I have got both of those. What about the .pro file? Do I need anything special there?
    Add the following
    import QtQuick 1.0
    import com.nokia.symbian 1.0
    import Qt.labs.components 1.0



    I think it is the part of symbian compoent. You can also check the following example which has many component commonly used in QML.

  7. #7
    Registered User
    Join Date
    Oct 2012
    Posts
    21

    Re: QML and Slider

    Thank you that worked.

Similar Threads

  1. Slider Bar
    By vicott in forum Symbian User Interface
    Replies: 6
    Last Post: 2009-09-28, 17:18
  2. Slider Event in N 95
    By Tasneem Rangwala in forum Symbian C++
    Replies: 1
    Last Post: 2008-06-09, 15:04
  3. Slider Control
    By asvindh in forum Symbian C++
    Replies: 2
    Last Post: 2006-05-18, 12:08
  4. Get a slider's value
    By ortiv in forum Symbian User Interface
    Replies: 0
    Last Post: 2003-11-26, 11:04
  5. Replies: 1
    Last Post: 2003-11-03, 12:34

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •