QWidget *myContainerWidget = new QWidget;
QGridLayout *myContainingLayout = new QGridLayout;
QLabel *myLabel = new QLabel;
myLabel->setText("my label");
QPushButton *myButton = new QPushButton;
myButton->setText("my button");
myContainingLayout->addWidget(myLabel);
myContainingLayout->addWidget(myButton);
myContainerWidget->setLayout(myContainingLayout);
myContainerWidget->show();
To copy to clipboard, switch view to plain text mode
I am sorry, I think I was not clear. I want a windows that has a pushButton with color text displayed on it. If the press that button, my app exits.
I cant use the constructor to set text because then I cant use colorful text. Hope I am clear now. Now, what should I do?
Bookmarks