GUI Rendering from Text
-
I have a text file which specifies all the GUI components, along with its title and names.
I need to parse the text file and render it using Qt.
Presently, I have only parsed it using 'yacc and lex' ...
Is there any other modules in Qt which offers the same functionality!!?
How can I do it best and efficiently!!?
Please Help...
Thank you....
-
No, I cant change the format. Can I convert the 'text format' that I have to the XML format required by Qt..?? How can I do that?
-
qlalr is used for parsing in a lot of places inside Qt and related tools. That is hardly documented though and require a lot of understanding of parser theory.
The sources are part of Qt itself IIRC.
-
It qlalr used for converting my format to xml!!?
Also how good it is to use the classic yacc and lex?
-
qlalr is a parser generator, thus is basically a tool like yacc.
-
What do I have to do if I have to convert the text file ( the present format) to the required XML(.ui format)
Awaiting your reply...
-
Well... you could start by creating a form in designer that contains the types of widgets you are going to have to support, and study its structure. Or... you could just parse the file yourself and create the requried widgets from code directly. I have no idea what would be easier in your case, as you did not tell us anything about your file format and requirements.
-
Thanks for the Reply
Well., the format is simple... There is a hierarchy... Parent Widgets and child widgets... Each widget is described by the basic characteristics like label,rect coordinates, font(for texts) etc...!!
And also.., How feasible it is to use the generated yyparse() in my source code!!?
-
To parse the file myself, what tools does Qt offer.., I can use regular expressions for labels.., but what about the yacc equivalent!!? :-o
-
Hi..,
I have a parser written using both lex and yacc.. I m happy to see these 'tags' available... But I m not sure how to use it..
Can someone please explain how i can go about using it!!?Thanks!
-
Well., I wanted to render a GUI which described in a text file. For which I had to write a parser and link the structure with my UI toolkit(Qt)
At present, I have the parser files(yacc and lex) but I m not sure how I ll make it work...
I came across a useful link, but culd really make much out of what was written
http://www.qtcentre.org/archive/index.php/t-3557.html
http://www.freehackers.org/thomas/2009/11/22/how-to-use-flex-and-bison-with-qmake-my-own-way/