how to draw a square and addWidget into Hlayout



  • Is it possible to draw a square component and addWidget into Hlayout

    Hlayout = new QHBoxLayout();
    

    // Hlayout->addWidget(button1);
    Hlayout->addWidget(stationlabel);
    Hlayout->addWidget(myTime2);
    Hlayout->addWidget(separator);
    Hlayout->addWidget(DateLabel2);



  • Hi,

    what do you mean??
    Can you post a sketch of what you want to get??



  • i need button1 to be red in color.
    to add this into QHLayout.
    next i hope it can be in the shape of a square

    // Hlayout->addWidget(button1);
    Hlayout->addWidget(stationlabel);
    Hlayout->addWidget(myTime2);
    Hlayout->addWidget(separator);
    Hlayout->addWidget(DateLabel2);


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.