qt 2020_0105

1. imitation wrote a calculator, QString familiar usage, in fact, the package of string processing, use a lot, and it can be a variety of basic type conversion toString, toInt toDoule, can turn negative, the transfer function will pass bool * If a successful conversion put the write is true or write false (possible conversion error)

2 lineEdit access to content, text (), set the content setText, generally can check online

3. botton can be set menue, we need to remember QMenu add a new header files, QMenu need addAction  

QAction * a1 = m-> addAction ( QIcon ( "F: /Qt/proj/2020_0105icon/timg.jpg"), "ac1", this, SLOT (fun ())); 

actually add some options to the menue .
This is a picture QIcon related classes, a button can be provided to image setQIcon 

4. Line Edite html format can display text, displayed on a web page in accordance with the effect of

Guess you like

Origin www.cnblogs.com/liujunsblocg/p/12153970.html