Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. International
  3. German
  4. Button Grid -> Scrollbar einfügen
Forum Update on Monday, May 27th 2025

Button Grid -> Scrollbar einfügen

Scheduled Pinned Locked Moved Unsolved German
1 Posts 1 Posters 527 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.
  • E Offline
    E Offline
    enim
    wrote on last edited by
    #1

    Hi zusammen,

    ich möchte zu meinem ButtonGrid eine Scrollbar hinzufügen, da ich variable festlegen kann wie viele Buttons in meinem Grid sind.

    Nachdem nicht jede Bildschirmauflösung gleich ist, möchte ich sobald das Grid größer als die Bildschirmauflösung ist scrollbar machen.

    Aber mir würde vertikal reichen.

    Ich habe mich an der Scrollbar versucht, aber die wird mir gar nicht erst angezeigt.

    ButtonMatrixWidget::ButtonMatrixWidget(QWidget *parent) :
    QWidget(parent)
    {

    QScrollBar* scrollBar = new QScrollBar;
    this->layout->addWidget(scrollBar);
    
    this->setWindowTitle("ButtonMatrix");
    

    // layout->setSizeConstraint(QLayout::SetMinAndMaxSize);

    QToolBar* toolbar = new QToolBar();
    this->setLayout(layout);
    
    toolbar->addWidget(spinBoxWidth);
    toolbar->addWidget(spinBoxLength);
    

    }

    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