qt

The simple model/view example often gives beginners an illusion that after they re-implement the 4 virtual functions: rowCount, columnCount, data, headerData, their model is ready to roll. (The root abstract […]

If you use QTextStream to read and write files, sooner or later, you will encounter the codec problem. Interestingly, Qt uses utf-8 string almost anywhere but QTextStream does not use […]

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 […]