Results 1 to 2 of 2

Thread: Testing QApplication descendant with QTestLib

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Oct 2007
    Location
    Lake Forest, CA, USA
    Posts
    132
    Qt products
    Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android
    Thanks
    10
    Thanked 27 Times in 22 Posts

    Default Testing QApplication descendant with QTestLib

    Hello,

    I'm trying to figure out how to use QTestLib with custom QApplication. So, I want to test if my command line aruments are handled correctly, for example language is set to the specified one (i.e. --set-lang=de). All the logic is placed in Application::exec().

    So, the question is how to run Application::exec() from my test. Then I'd like to create MainWindow and access any label within it to test its text.

    Thanks.
    Last edited by Oleg; 5th April 2012 at 14:09. Reason: spelling corrections

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. Replies: 2
    Last Post: 1st August 2011, 06:30
  3. Cruise Control and QtTestLib?
    By gfunk in forum Qt Programming
    Replies: 1
    Last Post: 15th November 2007, 19:16
  4. GUI Testing
    By larry104 in forum Qt Programming
    Replies: 1
    Last Post: 13th September 2007, 13:46
  5. <QtGui/QApplication> vs. <QApplication>
    By seneca in forum Qt Programming
    Replies: 5
    Last Post: 25th January 2006, 10:58

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.