Skip to content

Commit

Permalink
Agrego scroll a mapas
Browse files Browse the repository at this point in the history
  • Loading branch information
antopell committed Dec 5, 2023
1 parent c9a1ead commit 6ca5537
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/client/menu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include <QPushButton>
#include <QVBoxLayout>
#include <QWidget>
#include <QScrollArea>
#include <QStackedWidget>
#include <QFontDatabase>
#include <QPixmap>
Expand Down Expand Up @@ -103,12 +104,20 @@ InformacionInicial Menu::ejecutar(int argc, char* argv[], bool& es_host) {

QHBoxLayout *layoutHorizontalCrear = new QHBoxLayout();
QVBoxLayout *botonesCrear = new QVBoxLayout();
// QScrollArea* botonesCrear = new QScrollArea;
QWidget* scrollAreaContent = new QWidget;
scrollAreaContent->setLayout( botonesCrear );
QScrollArea* scrollArea = new QScrollArea;
scrollArea->setHorizontalScrollBarPolicy( Qt::ScrollBarAlwaysOff );
scrollArea->setVerticalScrollBarPolicy( Qt::ScrollBarAsNeeded );
scrollArea->setWidgetResizable( true );
scrollArea->setWidget( scrollAreaContent );

QSpacerItem *espacioIzqBotonesCrear = new QSpacerItem(100, 40, QSizePolicy::Minimum, QSizePolicy::Expanding);
QSpacerItem *espacioDerBotonesCrear = new QSpacerItem(100, 40, QSizePolicy::Minimum, QSizePolicy::Expanding);

layoutHorizontalCrear->addItem(espacioIzqBotonesCrear);
layoutHorizontalCrear->addLayout(botonesCrear);
layoutHorizontalCrear->addWidget(scrollArea);
layoutHorizontalCrear->addItem(espacioDerBotonesCrear);
verticalLayoutCrear->addLayout(layoutHorizontalCrear);

Expand Down

0 comments on commit 6ca5537

Please sign in to comment.