Results 1 to 3 of 3

Thread: Q_PROPERTY With Showing Property Like Geometry

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

    Smile Q_PROPERTY With Showing Property Like Geometry

    Hi
    I have made a custom Widget .Now i want to expose the different Properties of that Widget . I want to use a custm Property likeof Geometry so when it get expanded it shows the different Element and i can change the value in that attribute
    For this i have created a class Custom Class and use the Q_PROPERTY to expose the different element which have to show the property.Now i am using that class in my original Widget and again exposing by Q_PROPERTY with that class but i ma not getting the result
    Any Help would be great for me

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: Q_PROPERTY With Showing Property Like Geometry

    Quote Originally Posted by Ashutosh2k1 View Post
    I have made a custom Widget .
    OK
    Now i want to expose the different Properties of that Widget . I want to use a custm Property likeof Geometry so when it get expanded it shows the different Element and i can change the value in that attribute
    Sorry, lost me here. Properties are values stored against a QObject. They have no visual appearance. Where and how do you expect to "get expanded it shows different Element".?
    For this i have created a class Custom Class and use the Q_PROPERTY to expose the different element which have to show the property.Now i am using that class in my original Widget and again exposing by Q_PROPERTY with that class but i ma not getting the result
    No, hasn't made it any clearer.

    Rephrase your post including more information, perhaps even code snippets, and explain what "not getting the result" means. You might even try asking a targeted question.
    "We can't solve problems by using the same kind of thinking we used when we created them." -- Einstein
    If you are posting code then please use [code] [/code] tags around it - makes addressing the problem easier.

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

    Default Re: Q_PROPERTY With Showing Property Like Geometry

    Ya
    you are right. Suppose i want to show the Property Like Custom .It has Two element Like First and Second . So now i want to change the Value one and Two .
    i can create a single Property valueas
    Q_PROPERTY(int datatype ,READ dataType,WRITE setDAtaType)
    So similarly i want to use something like this
    Q_PROPERTY(CustomClass cls READ cls WRITE setCLs)
    where
    Custom class contains memeber like one and two so can it be possible

Similar Threads

  1. Replies: 2
    Last Post: 27th May 2010, 01:55
  2. How to mark Property name in Q_PROPERTY for language change??
    By Ankitha Varsha in forum Qt Programming
    Replies: 7
    Last Post: 14th April 2010, 13:22
  3. Showing QMainWindow without showing a child QWidget
    By discostu in forum Qt Programming
    Replies: 3
    Last Post: 4th March 2007, 09:03
  4. How to Use Q_PROPERTY
    By mitesh_modi in forum Qt Programming
    Replies: 7
    Last Post: 20th June 2006, 14:49
  5. QPixmap designer property not showing up
    By high_flyer in forum Qt Programming
    Replies: 1
    Last Post: 15th March 2006, 19:56

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
  •  
Qt is a trademark of The Qt Company.