Results 1 to 6 of 6

Thread: QPROPERTY With OtherDatatype

  1. #1
    Join Date
    Feb 2011
    Posts
    41
    Qt products
    Qt4
    Platforms
    Windows

    Default QPROPERTY With OtherDatatype

    Hi
    I have created a custom widget and i want to set different property of that custom widget .So for this i am defining the different property . However i aam able to see only those property whose data type is int .Is Something i am doing wrong
    Please help

    Kumar Ashutosh

  2. #2
    Join Date
    Nov 2010
    Posts
    315
    Thanked 53 Times in 51 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: QPROPERTY With OtherDatatype

    Quote Originally Posted by Ashutosh2k1 View Post
    Is Something i am doing wrong
    Yes, you made a secret what you exactly did.

  3. #3
    Join Date
    Feb 2011
    Posts
    41
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QPROPERTY With OtherDatatype

    Can u Explain What i have done

  4. #4
    Join Date
    Nov 2010
    Posts
    315
    Thanked 53 Times in 51 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: QPROPERTY With OtherDatatype

    OMG!
    Yes you ask to general question so nobody is able to answer. The best answer for now is http://doc.qt.nokia.com/latest/properties.html.

  5. #5
    Join Date
    Feb 2011
    Posts
    41
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QPROPERTY With OtherDatatype

    Hi
    I am doing exactly the same thing like
    Q_PROPERTY(int fProp READ fProp WRITE setFProp)
    Q_PROPERTY(float fSec READ fSec WRITe setSec)

    now i am giving the const implementation of read and returing void with setter function so tell me what i am doing wrong why the fSec which is declared as float is not coming as the property

    Relpy me

  6. #6
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QPROPERTY With OtherDatatype

    Where is it "not coming" as a property?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


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.