Qt_MainWindow Show Status Bar

    //     the QLabel the QLabel * Normal = new new ( "here is the status bar", the this);
     //     ui-> statusBar-> addWidget (Normal); // display information 

    UI -> statusbar-> with setSizeGripEnabled ( to false ); // removed triangle bottom right corner of the status bar 
    ui-> statusbar-> showMessage (TR ( " temporary information! " ), 5000 ); // display in front of the temporary information 5000ms information is covered by a normal time after when removed, will continue to display 

    QLabel * = Permanent new new QLabel ( the this ); 
    Permanent -> setFrameStyle (QFrame :: Box | QFrame :: Sunken); 
    Permanent -> setText (TR ( "<a href=\"http://www.danhongtec.com\"> status bar information </a> " )); 
    Permanent -> setOpenExternalLinks ( to true ); // set to open the web link 
    ui-> statusbar-> addPermanentWidget (permanent); // display pertinent information

 

Guess you like

Origin www.cnblogs.com/mc-r/p/12343491.html