qt use QT designer helloworld project to build the first interface

The first step: Click on New Project

 

Step Two: Select Qt Widgets

 

 

The third step: project name and save path

 

Step Four: Continue to click Next

 

 

Step Five: Click the implementation of the compiler will be able to appear on the interface box.

Select the widget application, there will be the following "interface file", you can create buttons, scroll bars, and so quickly by him.

This interface is nothing of

 

Step Six: Double-click the red box will appear interface design (that's QT designer)

 

Step Seven: Push Button to drag a box, then drag a label to the box

These two things to find in the left column

  

Find

This time the label (that is, the Text label) by widening a little mouse, is not enough to display the contents of location

 

Step eight: Turn right PushButton selected slot

And then select the first option, the mouse double-click trigger:

The function then the red box will appear:

 

Input at the cursor: ui-> label-> setText ( "hello world"); and then click Run

Screen appears after clicking PushButton, label will appear at hello world

Guess you like

Origin www.cnblogs.com/xuanbjut/p/12144188.html