Results 1 to 4 of 4

Thread: private classes in QT

  1. #1
    Join Date
    Feb 2009
    Location
    Noida, India
    Posts
    517
    Thanks
    21
    Thanked 66 Times in 62 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default private classes in QT

    hi,

    while going through the source of QT, i saw that they use private data classes for many of their classes, for ee.g. QMainWindow uss a QMainWindowPrivate..what is it used for..why such seperation of data members..my only guess in implicit data sharing..is that why they r there or some other multiple reason..any input would be greatly appreciated.

    Thanks!

  2. #2
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: private classes in QT

    The magic word is pimpl!

    http://en.wikipedia.org/wiki/Pimpl
    In computer programming, an opaque pointer is a datatype that hides its internal implementation using a pointer. This allows the implementation of the whole interface to change without the need to recompile the modules using it. This is important for providing binary code compatibility through different versions of a shared library, for example.

  3. The following user says thank you to Lykurg for this useful post:

    talk2amulya (19th February 2009)

  4. #3
    Join Date
    Feb 2009
    Location
    Noida, India
    Posts
    517
    Thanks
    21
    Thanked 66 Times in 62 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: private classes in QT

    oh thanks a lot for that! so that means, this has no significance to implicit data sharing? cuz in assistant, i saw an example of QSharedData and QSharedDataPointer where they did kind of the same thing to implement implicit data sharing..so is it possible that its used for multiple purposes?

  5. #4
    Join Date
    Oct 2006
    Location
    New Delhi, India
    Posts
    2,467
    Thanks
    8
    Thanked 334 Times in 317 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: private classes in QT

    This link might be useful

Similar Threads

  1. Multiple Classes setText Update
    By Msnforum in forum Qt Programming
    Replies: 5
    Last Post: 30th January 2009, 16:40
  2. Error signal connection between 2 classes
    By mattia in forum Newbie
    Replies: 6
    Last Post: 31st October 2007, 10:36
  3. Why does Qt use Private classes?
    By hyling in forum Qt Programming
    Replies: 2
    Last Post: 12th December 2006, 23:11
  4. We'll need a QT Jambi section!
    By GreyGeek in forum General Discussion
    Replies: 23
    Last Post: 30th September 2006, 01:38
  5. Link Errors
    By magikalpnoi in forum Qt Programming
    Replies: 5
    Last Post: 25th September 2006, 23:04

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.