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. How to add a QScrollArea as a tab in a QTabWidget
Forum Updated to NodeBB v4.3 + New Features

How to add a QScrollArea as a tab in a QTabWidget

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
4 Posts 3 Posters 653 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
    #1

    If I right click in a QTabWidget and select Insert Page/After Current Page it will add a new page containing a QWidget.

    How can I make that into QScrollArea ...

    I tried manually editing the ui file witha XML editor, but soon gave that up as a bad job.

    Clearly I not approaching this from the right direction - surely this must be possible?

    David

    JonBJ 1 Reply Last reply
    0
    • PerdrixP Perdrix

      If I right click in a QTabWidget and select Insert Page/After Current Page it will add a new page containing a QWidget.

      How can I make that into QScrollArea ...

      I tried manually editing the ui file witha XML editor, but soon gave that up as a bad job.

      Clearly I not approaching this from the right direction - surely this must be possible?

      David

      JonBJ Offline
      JonBJ Offline
      JonB
      wrote on last edited by JonB
      #2

      @Perdrix
      Make what into QScrollArea? Where do you want this? You can add one onto tabs after they are created, if that is what you mean. Designer adds a blank QWidget as a page, IIRC, you cannot change that fact, and should live with it.

      PerdrixP 1 Reply Last reply
      0
      • JonBJ JonB

        @Perdrix
        Make what into QScrollArea? Where do you want this? You can add one onto tabs after they are created, if that is what you mean. Designer adds a blank QWidget as a page, IIRC, you cannot change that fact, and should live with it.

        PerdrixP Offline
        PerdrixP Offline
        Perdrix
        wrote on last edited by
        #3

        @JonB I don't want it to be a QWidget, I want it to be a scroll area from the get go. If I add a scroll area to the QWidget, I'm offered no way to set a layout on the QWidget such that the scroll area will fill it

        M 1 Reply Last reply
        0
        • PerdrixP Perdrix

          @JonB I don't want it to be a QWidget, I want it to be a scroll area from the get go. If I add a scroll area to the QWidget, I'm offered no way to set a layout on the QWidget such that the scroll area will fill it

          M Offline
          M Offline
          mpergand
          wrote on last edited by
          #4

          @Perdrix said in How to add a QScrollArea as a tab in a QTabWidget:

          If I add a scroll area to the QWidget, I'm offered no way to set a layout on the QWidget

          It is possible but it is counter-intuitive :)

          • add the scroll area to the tab widget
          • right-clic on the tab widget and choose Lay out-> Lay out horizontal or vertical
          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