Results 1 to 2 of 2

Thread: making a droplist visible

  1. #1
    Join Date
    Oct 2015
    Posts
    1
    Qt products
    Qt5 Qt/Embedded

    Default making a droplist visible

    Hi,

    I have a panel which has something like:
    Qt Code:
    1. Item {
    2.  
    3. id:
    4. functions;
    5. }
    6.  
    7. DropList {
    8. id: dropList
    9. visible = false
    10. items:
    11. }
    12.  
    13. ButtonsContainer {
    14. id:
    15. items: GetItFromFunctionInItem()
    16. onItemClicked: {
    17. var value = text
    18.  
    19. }
    To copy to clipboard, switch view to plain text mode 
    I want to do something like:
    Qt Code:
    1. ButtonsContainer {
    2. id:
    3. onItemClicked: {
    4. var value = text
    5. dropList.visible = true
    6. }
    To copy to clipboard, switch view to plain text mode 
    How do I do this? If I try to access the "visible" property of DropList in ButtonsContainer::OnItermClicked, it does not work.
    My requirement is that once a value is selected, the drop list should become visible so that two more options are visible.

    Please help.

    Regards,
    rsmitha.
    Last edited by anda_skoa; 18th October 2015 at 09:19. Reason: missing [code] tags

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: making a droplist visible

    Aside from this not being valid code, the general concept of assigning a value to another object's property should work.

    Cheers,
    _

Similar Threads

  1. Replies: 3
    Last Post: 2nd January 2018, 13:04
  2. Always visible qml
    By Gerhman in forum Qt Quick
    Replies: 0
    Last Post: 18th August 2012, 07:15
  3. Replies: 2
    Last Post: 16th July 2010, 13:42
  4. QT help is not visible
    By ganeshrgaikwad in forum Installation and Deployment
    Replies: 0
    Last Post: 12th January 2010, 11:30
  5. Making rows visible in QTableView
    By derrickbj in forum Qt Programming
    Replies: 2
    Last Post: 11th October 2006, 16:38

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.