Nested qhash visual problems in QT Creator
So for my project because I don’t want to type things over and over again, I have the following:
- #define DATA QHash<QString,QString>
- #define DATASHEET QHash<QString,DATA>
However when I use DATASHEET, I get the following warning red underline with the text “Expected a declaration”. It compiles and works correctly but it’s very annoying because 1. it’s red underline which constantly trigger the thought that I did something wrong, and 2. I can’t use the popup helper that appears when I am accessing its functions. Is there a workaround to this? Manually typing QHash<QString,DATA> works fine. However, using DATASHEET as QHash<QString,QHash<QString,QString>> also causes the red underlines to popup.
If there is no workaround, I will just manually type QHash<QString,DATA> but I was wondering if there was a workaround.
Thanks in advance.
3 replies
You must log in to post a reply. Not a member yet? Register here!



