Results 1 to 7 of 7

Thread: QT Testing with Cmake

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Sep 2014
    Posts
    4
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QT Testing with Cmake

    ok well i agree its bit complicated
    but wht do u mean by
    make sure you include the moc file in the source for header-less declarations (as the comment suggests) or create a header.
    according to my knowledge if we use automoc then we include .moc file in the source
    if we use qt_wrap_cpp then we do not include anything in the source file
    plus do you see any error in my add_test

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: QT Testing with Cmake

    There might have been a change in how automoc works, but maybe that was related to cmake+Qt5.

    Hmm, I looked at your content again and it looks like you are trying to add your test's moc file to a library?
    Shouldn't the test be an exectuable?

    Cheers,
    _

  3. #3
    Join Date
    Sep 2014
    Posts
    4
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QT Testing with Cmake

    hi
    i fixed the problem
    turns out i was not ticking the test option in cmake but with few changes in cmakelist.
    Thanks for your contribution.

Similar Threads

  1. Testing Qt-Software with a GUI Testing Tool
    By nightghost in forum Qt Programming
    Replies: 8
    Last Post: 22nd February 2012, 07:43
  2. using QT unit testing with CMake
    By carpevitam in forum General Discussion
    Replies: 2
    Last Post: 3rd January 2011, 00:20
  3. Cmake
    By R.CH in forum Qt Programming
    Replies: 1
    Last Post: 7th October 2010, 17:06
  4. using moc with cmake
    By Isaac in forum Newbie
    Replies: 2
    Last Post: 29th May 2008, 03:10
  5. GUI Testing
    By larry104 in forum Qt Programming
    Replies: 1
    Last Post: 13th September 2007, 13:46

Tags for this Thread

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.