Oh, ok. Use QLabel then. Possibly inside QScrollArea.
Thank you.
I'm using Qt creator.
I have used Qt designer to create create MainWindow only.
The following files are generated: main.cpp, mainwindow.cpp, mainwindow.h and mainwindow.ui. The class MainWindow inherits the class Ui_mainwindow generated from mainwindow.ui. Ui_mainwindow class is defined in the file ui_mainwindow.h which does not appear in the file explorer. I understand the ui_mainwindow.h is generated automatically from mainwindow.ui
Further in the mainwindow.cpp, ui->setupUi(this) instantiate the screen. Please let me know what has to be done if I want to create QLabel and add this to UI through cpp file.
Where should that peice of code be written. ?? Please dont mind answering my silly questions. Thanks a lot.
You can put the label directly in Designer. If you don't want to, there is a section in the docs describing how to blend Designer generated forms with your C++ code.
Bookmarks