ctkSearchBoxTest1.cpp 733 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. // Qt includes
  2. #include <QApplication>
  3. #include <QDebug>
  4. #include <QVBoxLayout>
  5. #include <QTimer>
  6. // CTK includes
  7. #include "ctkSearchBox.h"
  8. // STD includes
  9. #include <cstdlib>
  10. #include <iostream>
  11. // ------------------------------------------------------------------------------
  12. int ctkSearchBoxTest1(int argc, char* argv[])
  13. {
  14. QApplication app(argc, argv);
  15. ctkSearchBox search;
  16. search.setShowSearchIcon(true);
  17. search.show();
  18. QWidget topLevel;
  19. ctkSearchBox search3;
  20. QVBoxLayout* layout = new QVBoxLayout;
  21. layout->addWidget(&search3);
  22. topLevel.setLayout(layout);
  23. topLevel.show();
  24. if (argc < 2 || QString(argv[1]) != "-I" )
  25. {
  26. QTimer::singleShot(200, &app, SLOT(quit()));
  27. }
  28. return app.exec();
  29. }