Results 1 to 4 of 4

Thread: Is silder an Item type ?

  1. #1
    Join Date
    Jan 2011
    Posts
    212
    Thanks
    24
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Is silder an Item type ?

    Hello forum,

    If Slider is an Item type, it should be possible to define the MouseArea . I am doing it as follows, but it is not capturing any event.

    Qt Code:
    1. Slider {
    2. id: outerTessellationSlider
    3. opacity: 1.0
    4. minimumValue: 1.0
    5. maximumValue: 35
    6. stepSize: 1.0
    7.  
    8. onValueChanged: tessSceneItem.outer = value
    9.  
    10. MouseArea
    11. {
    12. onEntered: console.log("Slider Entered")
    13. }
    14. }
    To copy to clipboard, switch view to plain text mode 

    What is missing above ?


    Thanks

  2. #2
    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: Is silder an Item type ?

    You forgot to enable accepting hover events.
    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.


  3. #3
    Join Date
    Jan 2011
    Posts
    212
    Thanks
    24
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Is silder an Item type ?

    Tried it with the following:

    Qt Code:
    1. hovered: true
    To copy to clipboard, switch view to plain text mode 

    Getting a blank screen.

    And
    Qt Code:
    1. hoverEnabled: true
    To copy to clipboard, switch view to plain text mode 
    is giving error as it is mentioning that the property is invalid.

  4. #4
    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: Is silder an Item type ?

    Quote Originally Posted by sajis997 View Post
    And
    Qt Code:
    1. hoverEnabled: true
    To copy to clipboard, switch view to plain text mode 
    is giving error as it is mentioning that the property is invalid.
    Works just fine here. Did you set the property on the right item?
    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.


Similar Threads

  1. Replies: 2
    Last Post: 27th November 2013, 00:56
  2. Print out graphics item type information
    By sajis997 in forum Qt Programming
    Replies: 1
    Last Post: 23rd January 2012, 19:53
  3. QGraphicsScene only creating one item of each type
    By Fallen_ in forum Qt Programming
    Replies: 1
    Last Post: 10th May 2011, 07:28
  4. Replies: 0
    Last Post: 6th September 2010, 09:02
  5. Replies: 17
    Last Post: 31st March 2006, 05:57

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.