c++ - Changing a Widget's name based on a string read in from an XML form in Qt -


I am writing a code for the voting machine which will allow the user to read in the custom XML ballot and then vote on them. Let me, however, have QtCreator in the current build, I do not have an easy way to edit buttons directly in my GUI. In the code snippet given below, I provide an element to exclude names and types of votes, But me gua The need to add a label as well as the change buttons reading candidates' names. to do this?

  while (! N.isNull ()) {QDomNode x = n.firstChildElement (); QDomElement e = n.toElement (); QMessageBox :: Information (0, tr ("Element" Loading), tr ("Our Element is% 1") .arg (e.tagName ())); QDomElement p = x.firstChildElement (); // Pars race QMessageBox :: Notification (0, tr ("Foo"), tr ("p =% 1"). Arg (p.text ())); // race and ballot type n = n.nextSibling () finds; }  

}

Created by using Designer All widget UI is available from your code. How to reach it depends on how you linked your use with your other classes (see), but if you use multiple heritage approaches, then your widgets and layouts will be accessible directly from your class through those names They will go through, in which they appear in the designer. The QT producer will also work with them.

With this in mind, you can easily use the general way of adding a label to the layout, changing the name of the widget.

If it is still unclear, please add the code used to embed your GUI, because you are required to give a smart code example.


Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -