Qt project file(.pro file) is used to control the build of projects. I seldom use that because I’m scared by so many mysterious macros. But if you do not want […]

To delete a layout from its containing layout, you may use parentlayout->removeItem(childlayout); However, the widgets on the child layout remain visible. Layout has no setVisible or hide method for you […]

I used the following code to convert html to plain text: QTextDocument doc; doc.setHtml( html); QString txt= doc.toPlainText(); Things went well until one day the program hang. After debugging, it […]

$dom = new DOMDocument(); $dom->load(“test.xml”); $text=$dom->getElementsByTagName(“Name”)->item(0)->nodeValue; The above code lines get the text between <Name></Name> Suppose the text between the tags is: <Name>http://myprogrammingnotes.com/index.php?p1=value1&amp;p2=http%3A%2F%2Fgoogle.com</Name> what would $text be? Is $text “http://myprogrammingnotes.com/index.php?p1=value1&amp;p2=http%3A%2F%2Fgoogle.com” […]

\b is kind of special, it is not a character, neither a class of characters. It represents a change from a word character(letters, numbers, underscore) to a non-word character(or end […]