Changeset 368 in flair-src for trunk/tools/FlairGCS


Ignore:
Timestamp:
Nov 12, 2020, 6:01:17 PM (12 months ago)
Author:
Sanahuja Guillaume
Message:

ajout d'ascenseurs dans la gcs

Location:
trunk/tools/FlairGCS/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/FlairGCS/src/Tab.cpp

    r15 r368  
    66#include "TabWidget.h"
    77#include <QGridLayout>
     8#include <QScrollArea>
    89
    910Tab::Tab(TabWidget *parent, QString name, int position)
    1011    : Layout(new QWidget(), parent, name, "Tab") {
    1112  parent_tab = parent;
    12   onglet = getQGridLayout()->parentWidget();
     13  QWidget *onglet = getQGridLayout()->parentWidget();
    1314  onglet->setObjectName(name);
     15 
     16  scroll = new QScrollArea;
     17  scroll->setWidget(onglet);
     18  scroll->setWidgetResizable(true);
     19  scroll->setFrameShape(QFrame::NoFrame);
     20       
    1421  if (position == -1) {
    15     parent->tab->addTab(onglet, name);
     22    parent->tab->addTab(scroll, name);
    1623  } else {
    17     parent->tab->insertTab(position, onglet, name);
     24    parent->tab->insertTab(position, scroll, name);
    1825  }
    1926}
    2027
    21 Tab::~Tab() { parent_tab->tab->removeTab(parent_tab->tab->indexOf(onglet)); }
     28Tab::~Tab() {
     29    parent_tab->tab->removeTab(parent_tab->tab->indexOf(scroll));
     30}
  • trunk/tools/FlairGCS/src/Tab.h

    r15 r368  
    99
    1010class TabWidget;
     11class QScrollArea;
    1112
    1213class Tab : public Layout {
     
    1819private:
    1920  TabWidget *parent_tab;
    20   QWidget *onglet;
     21  QScrollArea *scroll;
    2122};
    2223
Note: See TracChangeset for help on using the changeset viewer.