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/Designer problems with Tab Widget

Qt Creator/Designer problems with Tab Widget

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
1 Posts 1 Posters 790 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.
  • J Offline
    J Offline
    JonB
    wrote on 14 Jan 2020, 12:36 last edited by
    #1

    Using Qt Creator/Designer (4.8.1, Linux). Trying to put a Tab Widget (QTabWidget) on the layout and having problems accessing the individual tabs (QWidgets).

    Screenshot from 2020-01-14 12-05-02.png

    The designer creates hierarchy:

    tabWidget (QTabWidget)
        tab (QWidget)
        tab_2 (QWidget)
    

    I need each tab to be a QScrollArea, which can then have the tab QWidgets as the widget to scroll.

    I have spent way too long trying to make the end application work right where we retain the existing hierarchy and start adding the QScrollAreas as a child widget (via a layout) of the existing tab QWidget ones. (Things go wrong with scrolling. I spent a day trying to get it right, I can't carry on like this.).

    Now, I searched and all the examples of using QTabWidget (not designed from Qt Creator, but that's what there is) for scrolling say the hierarchy only should be:

    tabWidget (QTabWidget)
        scroll (QScrollArea)
            tab (QWidget)
        scroll_2 (QScrollArea)
            tab_2 (QWidget)
    

    So they make the QTabWidget child be QScrollArea, not plain QWidgets. I have tried this by "hacking" the final code and that works great for the scrolling, so that's what I'd like to do.

    But how to achieve it from Designer? I need the Morph into... context menu item for each QWidget tab. But when I select the tab (click on label), the context menu only gives me Page 1 of 2 > Delete or Promote to.... No Morph on the tabs, only for the whole tab widget. I cannot make the tabs be selected in the Object inspector by clicking in the main area. I can click on them in Object inspector, but that context menu does not offer Morph. ?

    If you really want to object to my desire for QTabWidget > QScrollArea > QWidget instead of QTabWidget > QWidget > QLayout > QScrollArea > QWidget please say so, but as I said I tried that and for whatever reason did not get the scrolling behaviour right.

    1 Reply Last reply
    0

    1/1

    14 Jan 2020, 12:36

    • Login

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