Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Struggling with QtDesigner and colocated controls

Struggling with QtDesigner and colocated controls

Scheduled Pinned Locked Moved Solved General and Desktop
3 Posts 2 Posters 230 Views 2 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.
  • PerdrixP Offline
    PerdrixP Offline
    Perdrix
    wrote on last edited by Perdrix
    #1

    I have a windows dialog that I am trying to convert to a Qt using QtDesigner.

    The windows rc file has a number of controls that are co-located and initially invisible. They are only made visible as needed and are laid out in two rows and two columns.

    So it might look like:
    f2e225d1-7c02-4c63-a270-daa67cae464b-image.png

    or
    3b216e2c-4f0b-4159-8e50-5ead40f63aca-image.png

    The relevant portion of the .rc file looks like:

        CONTROL         "Dark Optimization",IDC_DARKOPTIMIZATION,"Button",BS_AUTOCHECKBOX | NOT WS_VISIBLE | WS_TABSTOP,7,133,72,10
        CONTROL         "Hot Pixels detection and removal",IDC_HOTPIXELS,"Button",BS_AUTOCHECKBOX | NOT WS_VISIBLE | WS_TABSTOP,7,119,127,10
        CONTROL         "Bad Columns detection and removal",IDC_BADCOLUMNREMOVAL,
                        "Button",BS_AUTOCHECKBOX | NOT WS_VISIBLE | WS_TABSTOP,140,119,161,10
        CONTROL         "Dark Multiplication Factor:",IDC_USEDARKFACTOR,"Button",BS_AUTOCHECKBOX | NOT WS_VISIBLE | WS_TABSTOP,140,133,93,10
        EDITTEXT        IDC_DARKMULTIPLICATIONFACTOR,235,133,31,8,ES_RIGHT | ES_AUTOHSCROLL | NOT WS_VISIBLE | NOT WS_BORDER
        CONTROL         "Debloom",IDC_DEBLOOM,"Button",BS_AUTOCHECKBOX | NOT WS_VISIBLE | WS_TABSTOP,140,133,43,10
        LTEXT           "No Background Calibration",IDC_BACKGROUNDCALIBRATION,8,133,129,8,NOT WS_VISIBLE | NOT WS_GROUP
        PUSHBUTTON      "Settings...",IDC_DEBLOOMSETTINGS,184,130,50,14,NOT WS_VISIBLE
    
    

    I'm struggling to achieve this in QtDesigner, and would appreciate some guidance.

    Thanks, David

    1 Reply Last reply
    0
    • PerdrixP Offline
      PerdrixP Offline
      Perdrix
      wrote on last edited by
      #3

      I managed to achieve what I wanted by placing all the controls into a GroupBox which let me locate them exactly where I wanted to. Placing one control on top of another control works just fine.

      1 Reply Last reply
      1
      • mrjjM Offline
        mrjjM Offline
        mrjj
        Lifetime Qt Champion
        wrote on last edited by
        #2

        Hi
        One option is to use a QStackWidget.
        It allows you to have pages and in that way you can easily make such layout where you simply
        switch page for the look 2.
        https://doc.qt.io/qt-5/qstackedwidget.html

        1 Reply Last reply
        1
        • PerdrixP Offline
          PerdrixP Offline
          Perdrix
          wrote on last edited by
          #3

          I managed to achieve what I wanted by placing all the controls into a GroupBox which let me locate them exactly where I wanted to. Placing one control on top of another control works just fine.

          1 Reply Last reply
          1

          • Login

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