mirror of
https://github.com/RolandWH/SIPPCompare.git
synced 2025-04-20 00:11:48 +01:00
Compare commits
3 Commits
36a36f5437
...
68ac992483
Author | SHA1 | Date | |
---|---|---|---|
68ac992483 | |||
9ef6048601 | |||
107c388afb |
@ -6,20 +6,20 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>480</width>
|
<width>498</width>
|
||||||
<height>305</height>
|
<height>303</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>480</width>
|
<width>498</width>
|
||||||
<height>305</height>
|
<height>303</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="maximumSize">
|
<property name="maximumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>480</width>
|
<width>498</width>
|
||||||
<height>305</height>
|
<height>303</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
@ -28,10 +28,10 @@
|
|||||||
<widget class="QWidget" name="gridLayoutWidget">
|
<widget class="QWidget" name="gridLayoutWidget">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>10</x>
|
<x>20</x>
|
||||||
<y>10</y>
|
<y>20</y>
|
||||||
<width>461</width>
|
<width>461</width>
|
||||||
<height>251</height>
|
<height>243</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout">
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
@ -53,80 +53,28 @@
|
|||||||
<property name="verticalSpacing">
|
<property name="verticalSpacing">
|
||||||
<number>5</number>
|
<number>5</number>
|
||||||
</property>
|
</property>
|
||||||
<item row="8" column="0" colspan="2">
|
|
||||||
<widget class="QLabel" name="share_deal_reduce_amount_lab">
|
|
||||||
<property name="text">
|
|
||||||
<string>Share dealing discount amount</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="8" column="2">
|
|
||||||
<widget class="QDoubleSpinBox" name="share_deal_reduce_amount_box">
|
|
||||||
<property name="enabled">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<property name="buttonSymbols">
|
|
||||||
<enum>QAbstractSpinBox::ButtonSymbols::NoButtons</enum>
|
|
||||||
</property>
|
|
||||||
<property name="correctionMode">
|
|
||||||
<enum>QAbstractSpinBox::CorrectionMode::CorrectToNearestValue</enum>
|
|
||||||
</property>
|
|
||||||
<property name="prefix">
|
|
||||||
<string>£</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="4" column="2">
|
|
||||||
<widget class="QDoubleSpinBox" name="share_plat_max_fee_box">
|
|
||||||
<property name="enabled">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<property name="buttonSymbols">
|
|
||||||
<enum>QAbstractSpinBox::ButtonSymbols::NoButtons</enum>
|
|
||||||
</property>
|
|
||||||
<property name="correctionMode">
|
|
||||||
<enum>QAbstractSpinBox::CorrectionMode::CorrectToNearestValue</enum>
|
|
||||||
</property>
|
|
||||||
<property name="prefix">
|
|
||||||
<string>£</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="3">
|
<item row="0" column="3">
|
||||||
<widget class="QCheckBox" name="plat_name_check">
|
<widget class="QCheckBox" name="plat_name_check">
|
||||||
<property name="text">
|
|
||||||
<string/>
|
|
||||||
</property>
|
|
||||||
<property name="checked">
|
<property name="checked">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="0" colspan="2">
|
<item row="6" column="3">
|
||||||
<widget class="QLabel" name="plat_name_lab">
|
<widget class="QCheckBox" name="share_deal_fee_check">
|
||||||
<property name="text">
|
|
||||||
<string>Platform name</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="2">
|
|
||||||
<widget class="QLineEdit" name="plat_name_box"/>
|
|
||||||
</item>
|
|
||||||
<item row="3" column="3">
|
|
||||||
<widget class="QCheckBox" name="share_plat_fee_check">
|
|
||||||
<property name="enabled">
|
<property name="enabled">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
|
||||||
<string/>
|
|
||||||
</property>
|
|
||||||
<property name="checked">
|
<property name="checked">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="5" column="2">
|
<item row="5" column="2">
|
||||||
<widget class="QDoubleSpinBox" name="share_deal_fee_box">
|
<widget class="FastEditQDoubleSpinBox" name="share_plat_max_fee_box">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
<property name="buttonSymbols">
|
<property name="buttonSymbols">
|
||||||
<enum>QAbstractSpinBox::ButtonSymbols::NoButtons</enum>
|
<enum>QAbstractSpinBox::ButtonSymbols::NoButtons</enum>
|
||||||
</property>
|
</property>
|
||||||
@ -138,8 +86,18 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="2">
|
<item row="2" column="3">
|
||||||
<widget class="QDoubleSpinBox" name="fund_deal_fee_box">
|
<widget class="QCheckBox" name="fund_deal_fee_check">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="checked">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="6" column="2">
|
||||||
|
<widget class="FastEditQDoubleSpinBox" name="share_deal_fee_box">
|
||||||
<property name="buttonSymbols">
|
<property name="buttonSymbols">
|
||||||
<enum>QAbstractSpinBox::ButtonSymbols::NoButtons</enum>
|
<enum>QAbstractSpinBox::ButtonSymbols::NoButtons</enum>
|
||||||
</property>
|
</property>
|
||||||
@ -151,22 +109,98 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="0" colspan="2">
|
<item row="8" column="0" colspan="2">
|
||||||
|
<widget class="QLabel" name="share_deal_reduce_trades_lab">
|
||||||
|
<property name="text">
|
||||||
|
<string>Share dealing discount # of trades</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="9" column="3">
|
||||||
|
<widget class="QCheckBox" name="share_deal_reduce_amount_check"/>
|
||||||
|
</item>
|
||||||
|
<item row="5" column="0" colspan="2">
|
||||||
|
<widget class="QLabel" name="share_plat_max_fee_lab">
|
||||||
|
<property name="text">
|
||||||
|
<string>Share platform monthly fee cap</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="2">
|
||||||
|
<widget class="FastEditQDoubleSpinBox" name="fund_deal_fee_box">
|
||||||
|
<property name="buttonSymbols">
|
||||||
|
<enum>QAbstractSpinBox::ButtonSymbols::NoButtons</enum>
|
||||||
|
</property>
|
||||||
|
<property name="correctionMode">
|
||||||
|
<enum>QAbstractSpinBox::CorrectionMode::CorrectToNearestValue</enum>
|
||||||
|
</property>
|
||||||
|
<property name="prefix">
|
||||||
|
<string>£</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="6" column="0" colspan="2">
|
||||||
|
<widget class="QLabel" name="share_deal_fee_lab">
|
||||||
|
<property name="text">
|
||||||
|
<string>Share dealing fee*</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="8" column="2">
|
||||||
|
<widget class="FastEditQSpinBox" name="share_deal_reduce_trades_box">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="buttonSymbols">
|
||||||
|
<enum>QAbstractSpinBox::ButtonSymbols::NoButtons</enum>
|
||||||
|
</property>
|
||||||
|
<property name="correctionMode">
|
||||||
|
<enum>QAbstractSpinBox::CorrectionMode::CorrectToNearestValue</enum>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="8" column="3">
|
||||||
|
<widget class="QCheckBox" name="share_deal_reduce_trades_check"/>
|
||||||
|
</item>
|
||||||
|
<item row="4" column="3">
|
||||||
|
<widget class="QCheckBox" name="share_plat_fee_check">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="checked">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="0" colspan="2">
|
||||||
<widget class="QLabel" name="fund_deal_fee_lab">
|
<widget class="QLabel" name="fund_deal_fee_lab">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Fund dealing fee*</string>
|
<string>Fund dealing fee*</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="4" column="0" colspan="2">
|
<item row="5" column="3">
|
||||||
<widget class="QLabel" name="share_plat_max_fee_lab">
|
<widget class="QCheckBox" name="share_plat_max_fee_check"/>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="2">
|
||||||
|
<widget class="QLineEdit" name="plat_name_box"/>
|
||||||
|
</item>
|
||||||
|
<item row="9" column="0" colspan="2">
|
||||||
|
<widget class="QLabel" name="share_deal_reduce_amount_lab">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Share platform fee cap/mth</string>
|
<string>Share dealing discount amount</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="3" column="2">
|
<item row="4" column="0" colspan="2">
|
||||||
<widget class="QDoubleSpinBox" name="share_plat_fee_box">
|
<widget class="QLabel" name="share_plat_fee_lab">
|
||||||
|
<property name="text">
|
||||||
|
<string>Share platform fee*</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="4" column="2">
|
||||||
|
<widget class="FastEditQDoubleSpinBox" name="share_plat_fee_box">
|
||||||
<property name="buttonSymbols">
|
<property name="buttonSymbols">
|
||||||
<enum>QAbstractSpinBox::ButtonSymbols::NoButtons</enum>
|
<enum>QAbstractSpinBox::ButtonSymbols::NoButtons</enum>
|
||||||
</property>
|
</property>
|
||||||
@ -178,22 +212,15 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="7" column="3">
|
<item row="0" column="0" colspan="2">
|
||||||
<widget class="QCheckBox" name="share_deal_reduce_trades_check">
|
<widget class="QLabel" name="plat_name_lab">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string/>
|
<string>Platform name</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="5" column="0" colspan="2">
|
<item row="9" column="2">
|
||||||
<widget class="QLabel" name="share_deal_fee_lab">
|
<widget class="FastEditQDoubleSpinBox" name="share_deal_reduce_amount_box">
|
||||||
<property name="text">
|
|
||||||
<string>Share dealing fee*</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="7" column="2">
|
|
||||||
<widget class="QSpinBox" name="share_deal_reduce_trades_box">
|
|
||||||
<property name="enabled">
|
<property name="enabled">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
@ -203,59 +230,8 @@
|
|||||||
<property name="correctionMode">
|
<property name="correctionMode">
|
||||||
<enum>QAbstractSpinBox::CorrectionMode::CorrectToNearestValue</enum>
|
<enum>QAbstractSpinBox::CorrectionMode::CorrectToNearestValue</enum>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
<property name="prefix">
|
||||||
</item>
|
<string>£</string>
|
||||||
<item row="7" column="0" colspan="2">
|
|
||||||
<widget class="QLabel" name="share_deal_reduce_trades_lab">
|
|
||||||
<property name="text">
|
|
||||||
<string>Share dealing discount # of trades</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="8" column="3">
|
|
||||||
<widget class="QCheckBox" name="share_deal_reduce_amount_check">
|
|
||||||
<property name="text">
|
|
||||||
<string/>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="5" column="3">
|
|
||||||
<widget class="QCheckBox" name="share_deal_fee_check">
|
|
||||||
<property name="enabled">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string/>
|
|
||||||
</property>
|
|
||||||
<property name="checked">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="3" column="0" colspan="2">
|
|
||||||
<widget class="QLabel" name="share_plat_fee_lab">
|
|
||||||
<property name="text">
|
|
||||||
<string>Share platform fee*</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="3">
|
|
||||||
<widget class="QCheckBox" name="fund_deal_fee_check">
|
|
||||||
<property name="enabled">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string/>
|
|
||||||
</property>
|
|
||||||
<property name="checked">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="4" column="3">
|
|
||||||
<widget class="QCheckBox" name="share_plat_max_fee_check">
|
|
||||||
<property name="text">
|
|
||||||
<string/>
|
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
@ -267,7 +243,7 @@
|
|||||||
</property>
|
</property>
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>330</x>
|
<x>350</x>
|
||||||
<y>270</y>
|
<y>270</y>
|
||||||
<width>141</width>
|
<width>141</width>
|
||||||
<height>24</height>
|
<height>24</height>
|
||||||
@ -277,11 +253,11 @@
|
|||||||
<string>Save</string>
|
<string>Save</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QLabel" name="label">
|
<widget class="QLabel" name="req_field_lab">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>20</x>
|
<x>10</x>
|
||||||
<y>270</y>
|
<y>280</y>
|
||||||
<width>191</width>
|
<width>191</width>
|
||||||
<height>21</height>
|
<height>21</height>
|
||||||
</rect>
|
</rect>
|
||||||
@ -290,7 +266,35 @@
|
|||||||
<string>* Indicates required field</string>
|
<string>* Indicates required field</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
|
<widget class="QLabel" name="active_lab">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>437</x>
|
||||||
|
<y>10</y>
|
||||||
|
<width>61</width>
|
||||||
|
<height>16</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Active?</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignmentFlag::AlignCenter</set>
|
||||||
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
|
</widget>
|
||||||
|
<customwidgets>
|
||||||
|
<customwidget>
|
||||||
|
<class>FastEditQDoubleSpinBox</class>
|
||||||
|
<extends>QDoubleSpinBox</extends>
|
||||||
|
<header>widgets/fastedit_spinbox</header>
|
||||||
|
</customwidget>
|
||||||
|
<customwidget>
|
||||||
|
<class>FastEditQSpinBox</class>
|
||||||
|
<extends>QSpinBox</extends>
|
||||||
|
<header>widgets/fastedit_spinbox</header>
|
||||||
|
</customwidget>
|
||||||
|
</customwidgets>
|
||||||
<tabstops>
|
<tabstops>
|
||||||
<tabstop>plat_name_box</tabstop>
|
<tabstop>plat_name_box</tabstop>
|
||||||
<tabstop>fund_deal_fee_box</tabstop>
|
<tabstop>fund_deal_fee_box</tabstop>
|
||||||
|
@ -40,7 +40,7 @@ class SIPPCompare(QMainWindow):
|
|||||||
self.actionEdit_Platforms.triggered.connect(self.show_platform_edit)
|
self.actionEdit_Platforms.triggered.connect(self.show_platform_edit)
|
||||||
# Update percentage mix label when slider moved
|
# Update percentage mix label when slider moved
|
||||||
self.mix_slider.valueChanged.connect(self.update_slider_lab)
|
self.mix_slider.valueChanged.connect(self.update_slider_lab)
|
||||||
#self.value_input.valueChanged.connect(self.check_valid)
|
self.value_input.valueChanged.connect(self.check_valid)
|
||||||
self.share_trades_combo.currentTextChanged.connect(self.check_valid)
|
self.share_trades_combo.currentTextChanged.connect(self.check_valid)
|
||||||
self.fund_trades_combo.currentTextChanged.connect(self.check_valid)
|
self.fund_trades_combo.currentTextChanged.connect(self.check_valid)
|
||||||
|
|
||||||
@ -56,7 +56,8 @@ class SIPPCompare(QMainWindow):
|
|||||||
|
|
||||||
def check_valid(self):
|
def check_valid(self):
|
||||||
if self.share_trades_combo.currentText() != "" \
|
if self.share_trades_combo.currentText() != "" \
|
||||||
and self.fund_trades_combo.currentText() != "":
|
and self.fund_trades_combo.currentText() != "" \
|
||||||
|
and self.value_input.value() != 0:
|
||||||
self.calc_but.setEnabled(True)
|
self.calc_but.setEnabled(True)
|
||||||
else:
|
else:
|
||||||
self.calc_but.setEnabled(False)
|
self.calc_but.setEnabled(False)
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
from PyQt6.QtCore import QRegularExpression, QEvent, QObject, QTimer
|
from PyQt6.QtCore import QRegularExpression, QEvent, QObject, QTimer
|
||||||
from PyQt6.QtGui import QRegularExpressionValidator
|
from PyQt6.QtGui import QRegularExpressionValidator
|
||||||
from PyQt6.QtWidgets import QWidget
|
from PyQt6.QtWidgets import QWidget, QDoubleSpinBox
|
||||||
from PyQt6 import uic
|
from PyQt6 import uic
|
||||||
|
|
||||||
import main_window
|
import main_window
|
||||||
@ -79,17 +79,6 @@ class PlatformEdit(QWidget):
|
|||||||
# NOTE: Signal defined in UI file to close window when save button clicked
|
# NOTE: Signal defined in UI file to close window when save button clicked
|
||||||
self.save_but.clicked.connect(self.init_variables)
|
self.save_but.clicked.connect(self.init_variables)
|
||||||
|
|
||||||
# Install event filter on input boxes in order to select all text on focus
|
|
||||||
# TODO: Seems like my eventFilter() override is capturing all events - need to stop this
|
|
||||||
"""
|
|
||||||
self.fund_deal_fee_box.installEventFilter(self)
|
|
||||||
self.share_plat_fee_box.installEventFilter(self)
|
|
||||||
self.share_plat_max_fee_box.installEventFilter(self)
|
|
||||||
self.share_deal_fee_box.installEventFilter(self)
|
|
||||||
self.share_deal_reduce_trades_box.installEventFilter(self)
|
|
||||||
self.share_deal_reduce_amount_box.installEventFilter(self)
|
|
||||||
"""
|
|
||||||
|
|
||||||
# Set validators
|
# Set validators
|
||||||
# Regex accepts any characters that match [a-Z], [0-9] or _
|
# Regex accepts any characters that match [a-Z], [0-9] or _
|
||||||
self.plat_name_box.setValidator(
|
self.plat_name_box.setValidator(
|
||||||
@ -120,11 +109,12 @@ class PlatformEdit(QWidget):
|
|||||||
self.main_win.show()
|
self.main_win.show()
|
||||||
|
|
||||||
# When focus is given to an input box, select all text in it (easier to edit)
|
# When focus is given to an input box, select all text in it (easier to edit)
|
||||||
def eventFilter(self, obj: QObject, event: QEvent):
|
def focusInEvent(self, event):
|
||||||
if event.type() == QEvent.Type.FocusIn:
|
print("yay")
|
||||||
|
if event.gotFocus():
|
||||||
# Alternative condition for % suffix - currently unused
|
# Alternative condition for % suffix - currently unused
|
||||||
#if obj.value() == 0 or obj == self.share_plat_fee_box:
|
#if obj.value() == 0 or obj == self.share_plat_fee_box:
|
||||||
QTimer.singleShot(0, obj.selectAll)
|
QTimer.singleShot(0, sender.selectAll)
|
||||||
return False
|
return False
|
||||||
|
|
||||||
# This method does multiple things in order to validate the user's inputs:
|
# This method does multiple things in order to validate the user's inputs:
|
||||||
|
13
src/widgets/fastedit_spinbox.py
Normal file
13
src/widgets/fastedit_spinbox.py
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
from PyQt6.QtCore import QTimer
|
||||||
|
from PyQt6.QtWidgets import QSpinBox, QDoubleSpinBox
|
||||||
|
|
||||||
|
|
||||||
|
class FastEditQDoubleSpinBox(QDoubleSpinBox):
|
||||||
|
def focusInEvent(self, e):
|
||||||
|
QTimer.singleShot(0, self.selectAll)
|
||||||
|
super(FastEditQDoubleSpinBox, self).focusInEvent(e)
|
||||||
|
|
||||||
|
class FastEditQSpinBox(QSpinBox):
|
||||||
|
def focusInEvent(self, e):
|
||||||
|
QTimer.singleShot(0, self.selectAll)
|
||||||
|
super(FastEditQSpinBox, self).focusInEvent(e)
|
Loading…
x
Reference in New Issue
Block a user