Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Language Bindings
  4. Very newbie question how to __init__ classes the right way
QtWS25 Last Chance

Very newbie question how to __init__ classes the right way

Scheduled Pinned Locked Moved Language Bindings
1 Posts 1 Posters 735 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    MSDavid
    wrote on last edited by
    #1

    Hi!
    I'm still learning GUI Programming with Python and I found that different authors suggest different ways to initialize classes.

    For instance, Venkateshwaran Loganathan in his book "PySide GUI Application Development" always suggests the following form:

    @class SomeDialog(QDialog):
    def init(self):
    QDialog.init(self)
    ...@

    while Bogdan Milanowich in his "video tutorials":https://www.youtube.com/watch?v=0vvb7Kv59qA&index=3&list=PLe2ARo5vBp8A6XZbFYqV2FhWsSP0CnGeL, suggests the following:

    @class SomeOtherDialog(QDialog):
    def init(self, parent=None)
    super(SomeOtherDialog, self).init(parent)
    ...@

    What are the differences?
    Which is the best way?

    Thanks
    D.

    P.S. Sorry for bringing down the quality of discussions here ;-) with my questions

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved