TS 72 CNDQtSupport

C/C++ Pack Test Specification for Qt support

Author: Valeriy Soldatov
Version: 0.2
Lastupdate: 04.04.2012
Introduction: Test specification for Qt support in NetBeans 6.7 C/C++ Pack

Contents


Test suite: Qt support

Purpose: Verify Qt support in NetBeans C/C++ Pack 7.2
Direct link to Qt library: http://qt.nokia.com/downloads/downloads#qt-lib
Comment:
Qt4 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 unsupported).
Qt3 is unsupported.

  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. Select project in Projects tab and press 'Run Project' button on toolbar
    • EXPECTED RESULT: Qt project is created, built and launched. 'Hello Qt World' window is 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. Select project in Projects tab and press 'Build Project' button on toolbar
    5. Wait some seconds (project should 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' is started. 'Hello World Qt' form is opened in it.
  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 <QtGui/QApplication>'
    15. Type 'Form *f = new Form(); f->show();' in next line after 'QApplication app(argc, argv);'
    16. Select project in Projects tab and 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. Select project in Projects tab and press 'Build Project' button on toolbar
    5. Wait some seconds (project should be reparsed)
    6. Open HelloForm.cpp file in built-in editor
    7. Set line breakpoint at 42th line (if (0 < text.trimmed().length()) {)
    8. Select project in Projects tab and press 'Debug Project' button
    9. Type any text in 'Hello Qt World' window
    • EXPECTED RESULT: Program is 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