Solved Html parser
-
-
-
@aha_1980 said in Html parser:
https://solarianprogrammer.com/2011/10/16/cpp-11-raw-strings-literals-tutorial
error: 'R' was not declared in this scope
QString qHtml = R"(<button type="button">Click Me!</button>)";
^ -
@ManiRon
Hi
Code seems fine - so it must be compiler version.Is it an older Qt / Compiler ?
Its a c++ 11 feature with R (raw strings)
-
@mrjj its Qt 5.5
-
@ManiRon
Hi
Can you try to add
CONFIG += c++11
in your .pro file
then run qmake and rebuild all (from menu) and see if it accepts it then. -
-
- It worked sir
- But i am trying to create a button as you can see in the previous code its just displaying the text click me and not the button in the HTML file
- I know that in the list of attribute supported by QT <button> tag is not there whether we can make QT to make work on this
-
@ManiRon
Hi
Super. so was just c+11 support.
The QT widgets cannot draw html Buttons so if you
view them in textEdit/Browser no buttons can be shown.I know no easy way to have buttons, but you can try with
Qt WebEngine
instead and see if it likes it. -
@mrjj as i have not worked on it any sample will be available for Qtwebengine which can be help full to understand it