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. Expand QTextBroswer in QTabWidget
Forum Updated to NodeBB v4.3 + New Features

Expand QTextBroswer in QTabWidget

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
3 Posts 2 Posters 340 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.
  • L Offline
    L Offline
    LukeThe3rd
    wrote on last edited by
    #1

    How do I get my QTextBrowser widget to auto expand to the tab widget it is within? I want this to happen for each component in each of the tabs. I don't want to do it with code. I want to be able to do this all in QT Designer.

    Initially my tab QTabWidget in QDialog widget did not expand to fit the QDialog , but I found that if right clicked on it in the form and set Lay Out to Lay Out in a Grid that expanded it, but that option is grayed out for QTextBrowser when I try that.

    57665f5d-471d-478b-8efb-ac49c0ec8e26-image.png

    jsulmJ 1 Reply Last reply
    0
    • L LukeThe3rd

      How do I get my QTextBrowser widget to auto expand to the tab widget it is within? I want this to happen for each component in each of the tabs. I don't want to do it with code. I want to be able to do this all in QT Designer.

      Initially my tab QTabWidget in QDialog widget did not expand to fit the QDialog , but I found that if right clicked on it in the form and set Lay Out to Lay Out in a Grid that expanded it, but that option is grayed out for QTextBrowser when I try that.

      57665f5d-471d-478b-8efb-ac49c0ec8e26-image.png

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

      @LukeThe3rd Use layouts: https://doc.qt.io/qt-6/layout.html
      "but that option is grayed out for QTextBrowser when I try that" - should work like with any other widgets, but you should right click on the widget where you placed QTextBrowser and then select a layout.

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

      L 1 Reply Last reply
      1
      • jsulmJ jsulm

        @LukeThe3rd Use layouts: https://doc.qt.io/qt-6/layout.html
        "but that option is grayed out for QTextBrowser when I try that" - should work like with any other widgets, but you should right click on the widget where you placed QTextBrowser and then select a layout.

        L Offline
        L Offline
        LukeThe3rd
        wrote on last edited by
        #3

        @jsulm Wow. Thanks. That worked.

        I guess I was not paying close attention that when I did it before, I right clicked on the container (QDialog) and not the widget (QTabWidget) in the container to get the QTabWidget to expand. So right clicking on the QTabWidget and selecting Lay Out in a Grid expanded the QTextBrowser.

        Was a long day and I guess my attention span was waning.

        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