Python Forum
[PyQt] Push Button issue
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[PyQt] Push Button issue
#9
You need to call __init__ for the Stopwatch superclass before you start adding buttons. Calling super().__init__(), super(Stopwatch, this).__init__() or QWidget.__init__(this) teaches class Stopwatch how to do QWidget things. Stopwatch by itself does not know how to be the parent for start_button. That is why you got your error. If you moved the super __init__ to where it belongs (at or near the top of the __init__ method) your program should work.
Reply


Messages In This Thread
Push Button issue - by gvin47 - Apr-16-2020, 06:39 PM
RE: Push Button issue - by deanhystad - Apr-16-2020, 08:59 PM
RE: Push Button issue - by gvin47 - Apr-17-2020, 04:41 AM
RE: Push Button issue - by deanhystad - Apr-17-2020, 08:21 AM
RE: Push Button issue - by gvin47 - Apr-17-2020, 05:30 PM
RE: Push Button issue - by deanhystad - Apr-17-2020, 06:39 PM
RE: Push Button issue - by gvin47 - Apr-17-2020, 07:28 PM
RE: Push Button issue - by gvin47 - Apr-17-2020, 10:59 PM
RE: Push Button issue - by deanhystad - Apr-18-2020, 05:39 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  tkinter - touchscreen, push the button like click the mouse John64 5 878 Jan-06-2024, 03:45 PM
Last Post: deanhystad
  Centering and adding a push button to a grid window, TKinter Edward_ 15 4,910 May-25-2023, 07:37 PM
Last Post: deanhystad
  [PySimpleGui] How to alter mouse click button of a standard submit button? skyerosebud 3 5,042 Jul-21-2019, 06:02 PM
Last Post: FullOfHelp
  Windows GUI with push buttons to launch python scripts drifterf 7 4,225 Jul-17-2019, 05:34 PM
Last Post: Yoriz
  Text after push button chano 13 5,432 Jul-05-2019, 03:10 PM
Last Post: Yoriz
  [PyQt] Close program using Push Button with the help of input from a Message Box bhargavbn 2 6,704 Oct-30-2018, 05:09 AM
Last Post: bhargavbn
  [Tkinter] Selected radio button in push button in Tkinter prashantfunde91 1 11,857 Jun-22-2017, 05:27 PM
Last Post: DeaD_EyE
  PyQt4 get text from line edit into label on button push iFunKtion 2 21,829 Feb-27-2017, 12:14 PM
Last Post: iFunKtion

Forum Jump:

User Panel Messages

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