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. Qt Creator - working with promoted widgets in .ui file
Forum Update on Monday, May 27th 2025

Qt Creator - working with promoted widgets in .ui file

Scheduled Pinned Locked Moved Qt Creator and other tools
3 Posts 2 Posters 1.1k Views
  • 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.
  • F Offline
    F Offline
    frankiefrank
    wrote on last edited by
    #1

    My .ui file includes several "regular" widgets (like a QPlainTextEdit and QTableView) and several layouts, but there is an issue - one of my widgets is a promoted QWidget. It has child widgets inside it, but they are only created during runtime, and are initialized in code. So when the application runs, everything is fine.

    But when I'm working in the editor, this screws up the whole view. My promoted QWidget is displayed as a horizontal line. So when I want to place a new grid layout just above it, I'm really doing some serious pixel hunting. (The grid view would also end up a horizontal line but that's a separate problem.

    Is there are tip/trick to overcome this limitation of the designer? Any common practice that could help?

    "Roads? Where we're going, we don't need roads."

    1 Reply Last reply
    0
    • S Offline
      S Offline
      steno
      wrote on last edited by
      #2

      You can try to set a minimum or maximum size on your promoted widget to help and then remove those size constraints when you save the ui file.

      1 Reply Last reply
      0
      • F Offline
        F Offline
        frankiefrank
        wrote on last edited by
        #3

        Ah that's a relief!

        Do you have a similar solution for empty grid layouts that are populated during runtime?

        "Roads? Where we're going, we don't need roads."

        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