Edit stretch factor of mainwindow and add comments
MODIFY
src/mainwindow.ui
src/mainwindow.ui
<property name="enabled">
<bool>true</bool>
</property>
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+ <horstretch>0</horstretch>
+ <verstretch>1</verstretch>
+ </sizepolicy>
+ </property>
<property name="minimumSize">
<size>
<width>0</width>
<layout class="QGridLayout" name="gridLayout_5">
<item row="0" column="0">
<widget class="QTabWidget" name="tabWidget_2">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
<property name="currentIndex">
<number>0</number>
</property>

MODIFY
src/memorytab.cpp
src/memorytab.cpp
@@ -149,6 +149,7 @@ void MemoryTab::initializeMemoryView() {
m_delegate->setDisplayType(
qvariant_cast<displayTypeN>(m_ui->memorydisplaytype->currentData()));
+ // connect up/down buttons to adjust the central address of the model
connect(m_ui->memoryUp, &QPushButton::clicked, [=] {
m_model->offsetCentralAddress(4);
m_ui->memoryView->viewport()->repaint();
@@ -158,7 +159,7 @@ void MemoryTab::initializeMemoryView() {
m_ui->memoryView->viewport()->repaint();
});
- // Connect scroll events to the model
+ // Connect scroll events directly to the model
connect(m_ui->memoryView, &MemoryView::scrolled, [=](bool dir) {
if (dir) {
m_model->offsetCentralAddress(4);
@@ -167,13 +168,12 @@ void MemoryTab::initializeMemoryView() {
};
});
- // Disable editing
+ // Disable editing of memory - this is not implemented in the delegate
m_ui->memoryView->setEditTriggers(QAbstractItemView::NoEditTriggers);
// Connect goto combobox
connect(m_ui->gotoCombobox, &QComboBox::currentTextChanged, [=] {
m_model->jumpToAddress(m_ui->gotoCombobox->currentData().toUInt());
-
// Switch back to "select"
m_ui->gotoCombobox->blockSignals(true);
m_ui->gotoCombobox->setCurrentIndex(0);

Edit stretch factor of mainwindow and add comments