mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-20 15:53:54 +00:00
scroll area
This commit is contained in:
parent
022e3fcaca
commit
865e6b52ae
2 changed files with 12 additions and 4 deletions
|
@ -17,6 +17,7 @@
|
|||
#include <QLineEdit>
|
||||
#include <QPlainTextEdit>
|
||||
#include <QComboBox>
|
||||
#include <QScrollArea>
|
||||
|
||||
#include "../../model/world/columnbase.hpp"
|
||||
#include "../../model/world/idtable.hpp"
|
||||
|
@ -264,9 +265,8 @@ CSVWorld::DialogueSubView::DialogueSubView (const CSMWorld::UniversalId& id, CSM
|
|||
const QModelIndex indexToFocus(model->getModelIndex (id.getId(), 0));
|
||||
const int focusedRow = indexToFocus.row();
|
||||
|
||||
QWidget *widget = new QWidget (this);
|
||||
|
||||
setWidget (widget);
|
||||
QScrollArea *scrollArea = new QScrollArea(this);
|
||||
QWidget *widget = new QWidget (scrollArea);
|
||||
|
||||
QFrame* line = new QFrame(this);
|
||||
line->setObjectName(QString::fromUtf8("line"));
|
||||
|
@ -328,6 +328,11 @@ CSVWorld::DialogueSubView::DialogueSubView (const CSMWorld::UniversalId& id, CSM
|
|||
}
|
||||
|
||||
mWidgetMapper->setCurrentModelIndex (indexToFocus);
|
||||
|
||||
scrollArea->setMinimumWidth(250);
|
||||
scrollArea->setWidget(widget);
|
||||
scrollArea->setWidgetResizable(true);
|
||||
setWidget (scrollArea);
|
||||
}
|
||||
|
||||
void CSVWorld::DialogueSubView::setEditLock (bool locked)
|
||||
|
|
|
@ -162,7 +162,10 @@ QWidget *CSVWorld::CommandDelegate::createEditor (QWidget *parent, const QStyleO
|
|||
}
|
||||
if (display == CSMWorld::ColumnBase::Display_String ||
|
||||
display == CSMWorld::ColumnBase::Display_Skill ||
|
||||
display == CSMWorld::ColumnBase::Display_Script)
|
||||
display == CSMWorld::ColumnBase::Display_Script ||
|
||||
display == CSMWorld::ColumnBase::Display_Race ||
|
||||
display == CSMWorld::ColumnBase::Display_Class ||
|
||||
display == CSMWorld::ColumnBase::Display_Faction)
|
||||
{
|
||||
return new QLineEdit(parent);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue