Details
-
Suggestion
-
Resolution: Unresolved
-
Not Evaluated
-
None
-
5.12.0
-
None
-
OS: Kubuntu 22.04
Description
I am creating a QGroupBox on my QMainWindow window.
QGroupBox *GROUPBOXChemicalEquation;
GROUPBOXChemicalEquation=new QGroupBox(this);
GROUPBOXChemicalEquation->setGeometry(X, Y, width, height);
GROUPBOXChemicalEquation->setTitle("Chemical Equation");
So, that looks fine and good.
Then I want to place some controls on it. Let’s say, I want to put this button:
BUTTONCopyEnergy3=new QPushButton(“Copy”, GROUPBOXChemicalEquation); <====notice the GROUPBOXChemicalEquation
BUTTONCopyEnergy3->setGeometry(0, 0, BUTTONCopyEnergy3PosSize[2], BUTTONCopyEnergy3PosSize[3]);
THE PROBLEM:
The problem is the position of the button. It positions the button over the header text: Chemical Equation
This seems to work fine if the parent is a QTabWidget but what is it with QGroupBox? It can’t be a parent?
OS: Kubuntu 22.04