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. [SOLVED] Scrollarea doesn't show scrollbars and doesn't grow with

[SOLVED] Scrollarea doesn't show scrollbars and doesn't grow with

Scheduled Pinned Locked Moved General and Desktop
2 Posts 1 Posters 730 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.
  • H Offline
    H Offline
    heiopei
    wrote on last edited by
    #1

    Hey,

    I want to show my own QWidget, created by QtDesigner in my MainWindow also created by QtDesigner. The MainWindow got a scrollarea with a scrollAreaWidgetContents layout. So, my scrollarea should display several instance of my own QWidget in it. The problem now is that my QWidgets are displayed but overlap eachother and the scrollarea doesn't show the scrollbars and doesn't grow with. I hope you can unterstand my problem and I know my english isn't the best :(.

    Here is my code:
    @ //instance 1 of QWidget
    ab = new ablauf();
    //instance 2 of QWidget
    auto *ab2 = new ablauf();

    //add QWidget to Scrollarea layout
    ui->scrollAreaWidgetContents->layout()->addWidget(ab);
    ui->scrollAreaWidgetContents->layout()->addWidget(ab2);
    
    //set some props
    ui->scrollArea->setWidgetResizable(true);
    

    --@

    1 Reply Last reply
    0
    • H Offline
      H Offline
      heiopei
      wrote on last edited by
      #2

      Okay, I just changed the layout from the scrollarea. Now it's working.

      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