What is the secret of QMainWindow? And other questions.
Posted: Tue Dec 20 2022 8:24 pm
Source Code (Gui Example 4) from CopperSpice Journal Homepage.
If class MainWindow : public QWidget - all good works.
Is little change code: class MainWindow : public QMainWindow - widgets are not displayed in the window.
I suspect that the invisible remains layoutMain :
QVBoxLayout *layoutMain = new QVBoxLayout(this);
I also tried
QVBoxLayout *layoutMain = new QVBoxLayout(centralWidget()); // this not works!
The second question is about Copper Space Designer.
I have generated the wrong code for QToolBar in the ui_PrabhupadaDictionaryWindow file.h:
PrabhupadaDictionaryWindow->addtoolbar(Qt::, tbPrabhupada);
I have to edit the code manually:
PrabhupadaDictionaryWindow->addToolBar(tbPrabhupada);
The third question:
Here I am in CopperSpice Designer making the window the successor of QMainWindow, then I add QVBoxLayout. I want this QVBoxLayout to automatically expand to the entire available area of the window (like Align = alClient in Delphi or C++Builder), but it just has a fixed size and position and is not tied to the size of the window in any way.
The fourth question:
Is it possible in CopperSpice Designer to install a button with a question mark in the window title. Maybe I don't understand it that way, but it seems to me that such a button is needed to show the whatThis property. How should the user view the whatThis property for different Widgets?
With best regards, Navavdvipa Chandra das.
If class MainWindow : public QWidget - all good works.
Is little change code: class MainWindow : public QMainWindow - widgets are not displayed in the window.
I suspect that the invisible remains layoutMain :
QVBoxLayout *layoutMain = new QVBoxLayout(this);
I also tried
QVBoxLayout *layoutMain = new QVBoxLayout(centralWidget()); // this not works!
The second question is about Copper Space Designer.
I have generated the wrong code for QToolBar in the ui_PrabhupadaDictionaryWindow file.h:
PrabhupadaDictionaryWindow->addtoolbar(Qt::, tbPrabhupada);
I have to edit the code manually:
PrabhupadaDictionaryWindow->addToolBar(tbPrabhupada);
The third question:
Here I am in CopperSpice Designer making the window the successor of QMainWindow, then I add QVBoxLayout. I want this QVBoxLayout to automatically expand to the entire available area of the window (like Align = alClient in Delphi or C++Builder), but it just has a fixed size and position and is not tied to the size of the window in any way.
The fourth question:
Is it possible in CopperSpice Designer to install a button with a question mark in the window title. Maybe I don't understand it that way, but it seems to me that such a button is needed to show the whatThis property. How should the user view the whatThis property for different Widgets?
With best regards, Navavdvipa Chandra das.