Inserting an image in a GUI using Qt Designer

You can start inserting a label. Next, you right click on it an then click “change rich text…”. A new window will pop-up. Click on the figure Icon “Insert figure”. Now, you have to create a resource file. Click on the Pencil button. Next, click on the “New resource file” button. Choose a name and … Read more

Initially hidden control in Qt Creator

You can’t. The visible property seems to be voluntarily removed from the property editor of Qt Designer and you can’t add it back. You can add the property manually to the .ui file by adding the following XML block inside the node for the widget you want to hide: <property name=”visible”> <bool>false</bool> </property> But the … Read more

Qt Layout on QMainWindow

If you want to do it with code instead of using QtCreator, you could set the layout in a QWidget and then set the QWidget as the central widget of the main window like this: #include <QtGui> #include <QWidget> #include <QHBoxLayout> #include “mainwindow.h” MainWindow::MainWindow() { // Set layout QHBoxLayout *layout = new QHBoxLayout; layout->addWidget(myWidget1); layout->addWidget(myWidget2); … Read more

Set label text in QTabWidget tab

It sounds like you’re talking about Qt Designer, since it defaults to showing two tabs (called “Tab 1” and “Tab 2”) when you add a QTabWidget through the interface. If so, click on the tab you want to rename, then in the Property Editor (if you can’t find it make sure it’s visible by using … Read more

Inserting an image in GUI using QT Designer

You can start inserting a label. Next, you right click on it an then click “change rich text…”. A new window will pop-up. Click on the figure Icon “Insert figure”. Now, you have to create a resource file. Click on the Pencil button. Next, click on the “New resource file” button. Choose a name and … Read more

tech