Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. QtCreator - JSON-Based Wizards and question about Combo Boxes
Forum Updated to NodeBB v4.3 + New Features

QtCreator - JSON-Based Wizards and question about Combo Boxes

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
4 Posts 3 Posters 367 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • W Offline
    W Offline
    woocom
    wrote on last edited by
    #1

    Hello,

    A quick question about checkbox in JSON-Based Wizards.
    Is it possible to create dependent checkboxes on one field? For example the second option depends on the first option. I will give a simple example:

    "pages":
        [
            {
                "trDisplayName": "Options",
                "trShortTitle": "The second option depends on the first option",
                "typeId": "Fields",
                "data":
                [
                {
                    "name": "CB_1",
                    "trDisplayName": "Options:",
                    "type": "ComboBox",
                    "data":
                    {
                        "items": [ { "trKey": "<Custom>", "value": "" },
                                   "Option_1", "Option_2"]
                    }
                },
                {
                    "name": "CB_2",
                    "trDisplayName": "Seconds options:",
                    "type": "ComboBox",
                    "data":
                    {
                        "items": [ { "trKey": "Option_1_1", "value": "", "condition": "%{JS: value('CB_1') === 'Option_1'}" },
                                   { "trKey": "Option_1_2", "value": "", "condition": "%{JS: value('CB_1') === 'Option_1'}" },
                                   { "trKey": "Option_2_1", "value": "", "condition": "%{JS: value('CB_1') === 'Option_2'}" }]
                    }
                }
                ]
            }
        ]
    

    Unfortunately, this code doesn't work. When I change the first option, the second does not refresh. It works when I divide combo boxes into different fields.

    Any suggestions?

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      You should add the versions you are currently working with.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • W Offline
        W Offline
        woocom
        wrote on last edited by
        #3

        Of course!
        QtCreator 4.10.1 based on Qt 5.13.1.

        Second question:
        Is it possible to add scrollbar to page where I have many widgets? Now I have to resize window to fit widgets.

        jsulmJ 1 Reply Last reply
        0
        • W woocom

          Of course!
          QtCreator 4.10.1 based on Qt 5.13.1.

          Second question:
          Is it possible to add scrollbar to page where I have many widgets? Now I have to resize window to fit widgets.

          jsulmJ Offline
          jsulmJ Offline
          jsulm
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @woocom said in QtCreator - JSON-Based Wizards and question about Combo Boxes:

          Is it possible to add scrollbar to page where I have many widgets?

          Yes, https://doc.qt.io/qt-5/qscrollarea.html

          https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved