Python Forum
How to change a value in one box change another too
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to change a value in one box change another too
#2
Do exactly what you are doing for the second row. You may have to use some sort of flag to break the cycle.
def factor_changed(self):
    if not self.updating:
        self.updating = True
        self.modified_loss.setText(str(self.factor.value() * self.bat_loss))
        self.updating = False

def modified_loss_changed(self):
    if not self.updating:
        self.updating = True
        self.factor.setText(str(whatever))
        self.updating = False
Reply


Messages In This Thread
RE: How to change a value in one box change another too - by deanhystad - Aug-04-2020, 01:05 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  event driven coding PyQt6 on Combobox change merrittr 3 2,176 May-03-2023, 03:35 AM
Last Post: merrittr
  Update exist plot while change upper limit or lower limit SamLiu 1 1,004 Feb-05-2023, 10:09 AM
Last Post: SamLiu
  Can't change the colour of Tk button text Pilover 6 14,968 Nov-15-2022, 10:11 PM
Last Post: woooee
  [PyQt] [Solved]Change text color of one line in TextBrowser Extra 2 5,009 Aug-23-2022, 09:11 PM
Last Post: Extra
  [Tkinter] Tkinter don't change the image DQT 2 1,686 Jul-22-2022, 10:26 AM
Last Post: menator01
  [WxPython] [SOLVED] How to change button label? Winfried 3 2,145 May-31-2022, 06:37 PM
Last Post: Winfried
  Tkinter - How can I change the default Notebook border color? TurboC 5 14,897 May-23-2022, 03:44 PM
Last Post: bigmac
Question [Tkinter] Change Treeview column color? water 3 9,769 Mar-04-2022, 11:20 AM
Last Post: Larz60+
  Can't get tkinter button to change color based on changes in data dford 4 3,495 Feb-13-2022, 01:57 PM
Last Post: dford
  how to change font size barryjo 4 4,031 Jan-26-2022, 08:46 PM
Last Post: menator01

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020