Results 1 to 6 of 6

Thread: QSlider with double Heads..

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QSlider with double Heads..

    Quote Originally Posted by georgie
    Q_Q(QAbstractSlider) seems to give access to some member q, and likewise Q_D(QAbstractSlider) makes some member d available

    what do these macros mean?
    Qt Code:
    1. #define Q_D(Class) Class##Private * const d = d_func()
    2. #define Q_Q(Class) Class * const q = q_func()
    To copy to clipboard, switch view to plain text mode 
    Q_D macro declares a variable that points to the private part of the implementation, while Q_Q works the other way around --- gives you access to public part of the implementation.

    If you want to know why the implementation is split into public and private part, ask google about "pimpl".
    Last edited by jacek; 9th May 2006 at 14:30.

  2. The following 2 users say thank you to jacek for this useful post:

    cocheci (18th May 2006), georgie (10th May 2006)

Similar Threads

  1. Double Click Capturing
    By ToddAtWSU in forum Qt Programming
    Replies: 2
    Last Post: 8th January 2011, 14:12
  2. Scaling
    By AD in forum Qt Programming
    Replies: 16
    Last Post: 11th July 2008, 10:55

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
  •  
Qt is a trademark of The Qt Company.