Results 1 to 9 of 9

Thread: Qt and Templates

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Mar 2006
    Location
    Moldova
    Posts
    12
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Qt and Templates

    QObject classes does not support templates

    During compilation i get this:

    Error: Template classes not supported by Q_OBJECT
    All Rights Reserved ...

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

    Default Re: Qt and Templates

    They do, only that you can't use Q_OBJECT macro with a template class. You need to subclass twice -- first introduce Q_OBJECT, define all the signals and slots you want and then subclass again and introduce the template.
    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.


Similar Threads

  1. help with templates please
    By GrahamLabdon in forum Newbie
    Replies: 2
    Last Post: 4th February 2011, 17:29
  2. templates
    By mickey in forum General Programming
    Replies: 5
    Last Post: 16th January 2008, 15:25
  3. dynamic_cast and templates
    By KShots in forum General Programming
    Replies: 7
    Last Post: 7th August 2007, 20:01
  4. templates and Q_OBJECT
    By TheKedge in forum General Programming
    Replies: 12
    Last Post: 15th September 2006, 05:41
  5. Templates : Help Please
    By sunil.thaha in forum General Programming
    Replies: 4
    Last Post: 14th February 2006, 13: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
  •  
Qt is a trademark of The Qt Company.