TS 67 CNDQtSupport

C/C++ Pack Test Specification for Qt support

Author: Valeriy Soldatov
Version: 0.2
Last update: 05.07.2013
Introduction: Test specification for Qt support in NetBeans 7.4 C/C++ Pack

Contents


Test suite: Qt support

Purpose: Verify Qt support in NetBeans C/C++ Pack 7.4
Comment:
Qt4 or Qt5 library should be installed on your machine and path to qmake, designer and other Qt's utilities should be added into PATH environment variable.
On Windows MinGW and MSYS should be installed (Cygwin is not a supported).
Qt3 is not a supported.

  1. Create and Run 'Hello Qt World' sample
    1. New Project > Samples > C/C++ > Hello Qt World
    2. Specify a project name and location
    3. Press Finish button
    4. Press 'Run Project' button on toolbar
    • EXPECTED RESULT: Qt project has been created, built and launched. 'Hello Qt World' window appeared.
  2. Verify code assistance in Qt project
    1. New Project > Samples > C/C++ > Hello Qt World
    2. Specify a project name and location
    3. Press Finish button
    4. Press 'Build Project' button on toolbar
    5. Wait project will be reparsed
    6. Call context menu on project. Check 'Code Assistance > Failed #include/#error Directives...' menu item
    • EXPECTED RESULT: 'Code Assistance > Failed #include/#error Directives...' menu item should be disabled.
  3. Launch Qt Designer from NetBeans
    1. New Project > Samples > C/C++ > Hello Qt World
    2. Specify a project name and location
    3. Press Finish button
    4. Find 'Resource Files | HelloForm.ui' file in project
    5. Call context menu on this file. Select 'Open' menu item
    • EXPECTED RESULT: 'Qt Designer' started. 'Hello World Qt' form is opened in Designer.
  4. Create simple Qt's project
    1. New Project > C/C++ > C/C++ Qt Application
    2. Specify a project name and location
    3. Let the Create Main File check box checked (File name is 'main')
    4. Press Finish button
    5. Select 'Resource File' logical folder in project
    6. Press New File... button
    7. Select Qt > Qt Form and press Next button
    8. Type 'Form' in New Form text field
    9. Set Form Type as 'Dialog with Buttons Bottom'
    10. 'Create C/C++ wrapper class' check box should be checked
    11. Press Finish button
    12. Close 'Qt Designer'
    13. Open 'Source Files | main.cpp' file in built-in editor
    14. Type '#include "Form.h"' in next line after '#include <QApplication>'
    15. Type 'Form *f = new Form(); f->show();' in next line after 'QApplication app(argc, argv);'
    16. Press 'Run Project' button on toolbar
    • EXPECTED RESULT: 'Form' window is appeared.
  5. Check debugger
    1. New Project > Samples > C/C++ > Hello Qt World
    2. Specify a project name and location
    3. Press Finish button
    4. Press 'Build Project' button on toolbar
    5. Wait project will be reparsed
    6. Open HelloForm.cpp file in built-in editor
    7. Set line breakpoint at 42th line (if (0 < text.trimmed().length()) {)
    8. Press 'Debug Project' button
    9. Type any text in 'Hello Qt World' window
    • EXPECTED RESULT: Program stopped at 42th line (42th line has green background in editor). 'text' variable in 'Variables' tab has 'const QString& text' type.
Not logged in. Log in, Register

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo