Results 1 to 2 of 2

Thread: add qml item dynamically on btn click

  1. #1
    Join Date
    Jun 2016
    Posts
    99
    Thanks
    18
    Thanked 1 Time in 1 Post
    Qt products
    Qt5
    Platforms
    Unix/X11

    Default add qml item dynamically on btn click

    I want to added check boxes to a dialog on a button click but not sure how to get started. either a function in qml or c++ to add a check-box item to a dialog....

    any ideas?

  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: add qml item dynamically on btn click

    Depends a bit on what you need, but likely by using a model that has the label and the state of the checkbox and provides methods for changing the state.
    Then using that model as the input for a Repeater or ListView.

    Cheers,
    _

Similar Threads

  1. Dynamically resize item of QListWidget
    By Alundra in forum Qt Programming
    Replies: 1
    Last Post: 5th January 2016, 23:20
  2. how to create click event dynamically???
    By Radhika in forum Qt Programming
    Replies: 2
    Last Post: 21st December 2015, 10:03
  3. Replies: 1
    Last Post: 6th January 2014, 07:01
  4. Replies: 0
    Last Post: 26th December 2013, 06:58
  5. Replies: 2
    Last Post: 7th June 2012, 14:04

Tags for this Thread

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.