Advertisement
Guest User

main.cpp

a guest
Aug 11th, 2019
155
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <QApplication>
  2.  
  3. #include "taglist.h"
  4. #include "tagtuple.h"
  5. #include "tagcolor.h"
  6.  
  7. int main(int argc, char **argv)
  8. {
  9.     QApplication app(argc, argv);
  10.  
  11.     TagList tagList;
  12.  
  13.     /* If Tags are added here they will work fine.
  14.     tagList.addTag(TagTuple(0, "tag one"), TagColor::GREEN);
  15.     tagList.addTag(TagTuple(1, "tag two"), TagColor::GREEN);
  16.     tagList.addTag(TagTuple(2, "tag three"), TagColor::GREEN);
  17.     tagList.addTag(TagTuple(3, "tag four"), TagColor::GREEN);
  18.     tagList.addTag(TagTuple(4, "tag five"), TagColor::GREEN);
  19.     tagList.addTag(TagTuple(5, "tag six"), TagColor::GREEN);
  20.     tagList.addTag(TagTuple(6, "tag seven"), TagColor::GREEN);
  21.     */
  22.  
  23.     // Which side of the call to show() the tags are added will
  24.     // determine whether they work as expected or not.
  25.     tagList.show();
  26.  
  27.     // If tags are added here "tag seven" will break.
  28.     tagList.addTag(TagTuple(0, "tag one"), TagColor::GREEN);
  29.     tagList.addTag(TagTuple(1, "tag two"), TagColor::GREEN);
  30.     tagList.addTag(TagTuple(2, "tag three"), TagColor::GREEN);
  31.     tagList.addTag(TagTuple(3, "tag four"), TagColor::GREEN);
  32.     tagList.addTag(TagTuple(4, "tag five"), TagColor::GREEN);
  33.     tagList.addTag(TagTuple(5, "tag six"), TagColor::GREEN);
  34.     tagList.addTag(TagTuple(6, "tag seven"), TagColor::GREEN);
  35.  
  36.     return app.exec();
  37. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement