Results 1 to 3 of 3

Thread: Separate Classes for Windows

  1. #1
    Join Date
    Jun 2011
    Posts
    203
    Thanks
    7
    Thanked 4 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default Separate Classes for Windows

    Hi guys, just wondering when one should create a unique class for every window and when to use one class and create different instances of it? Quite a generic question but I don't have a more intelligent question to ask at this stage as my knowledge is too limited so all general advice welcome.

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Separate Classes for Windows

    If you have ten classes that do almost the same things then you should merge them into a common hierarchy -- have a base class containing functionality common to all the classes and derive from that base class if you need some added or modified functionality.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. #3
    Join Date
    Jun 2011
    Posts
    203
    Thanks
    7
    Thanked 4 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default Re: Separate Classes for Windows

    Thanks, I understand now.

Similar Threads

  1. How to access Classes from another Classes
    By revellix in forum General Programming
    Replies: 1
    Last Post: 4th August 2011, 15:39
  2. construction of classes within classes
    By mobucl in forum Newbie
    Replies: 8
    Last Post: 10th January 2011, 13:51
  3. run a QMessageBox from a separate QThread
    By franco.amato in forum Qt Programming
    Replies: 2
    Last Post: 6th April 2010, 04:33
  4. Replies: 0
    Last Post: 2nd February 2009, 14:24
  5. separate a QString
    By Zergi in forum Newbie
    Replies: 1
    Last Post: 18th July 2008, 21:50

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.