Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <memory>
- #include <QApplication>
- #include <QListWidget>
- #include <QListWidgetItem>
- #include <QPushButton>
- int main(int argc, char *argv[]) {
- QApplication app(argc, argv);
- auto item = new QListWidgetItem();
- auto button = new QPushButton("I'm a button.");
- std::unique_ptr<QListWidget> list(new QListWidget());
- list->addItem(item);
- list->setItemWidget(item, button);
- list->show();
- return app.exec();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement