Layout problem
-
Hello I am using Grid Layout in one of my forms. In that form I have QCustomPlot widget. The problem is that when I run the code, it gets something different than the layout. And of course I cannot move it by using move() command...
That is how it looks line in Design window:
Notice that there is no space between the selected widget and the QTableWidget.When I run it:
Now there is a a space between QTableWidget and the Graph, that comes from nowhere. Also eventhough I use layout and my custom widget is inside of that layout, still the CustomWidget (Graph) is cut from half. How can I solve that? -
Hello I am using Grid Layout in one of my forms. In that form I have QCustomPlot widget. The problem is that when I run the code, it gets something different than the layout. And of course I cannot move it by using move() command...
That is how it looks line in Design window:
Notice that there is no space between the selected widget and the QTableWidget.When I run it:
Now there is a a space between QTableWidget and the Graph, that comes from nowhere. Also eventhough I use layout and my custom widget is inside of that layout, still the CustomWidget (Graph) is cut from half. How can I solve that?@GunkutA said in Layout problem:
How can I solve that?
Please show how you put your custom widget into that layout.
-
@GunkutA said in Layout problem:
How can I solve that?
Please show how you put your custom widget into that layout.
-
@jsulm Probably I am answering in the wrong way but, I directly created a QWidget in GUI and then promoted it to QCustomPlot widget. Again by using user interface window. Was that what you asked for? Because I didn't put it in the code.
-
@jsulm That is for plotting. That is a premade plotting library for creating graphs. Yes it uses paint events and QCPPainter.
-
@GunkutA You would have to provide more information about your custom widget, else only guessing is possible.
@jsulm Well that's this one: QCustomPlot](https://www.qcustomplot.com/#:~:text=QCustomPlot is a Qt C%2B%2B widget for plotting and data visualization.&text=QCustomPlot is the solution for,use QCP in free software!)
I don't have adequate information about its content. There are more than 30.000 lines of code in it. But what I cannot understand is independent from the widget and its content, in the UI its borders and boundaries are visible. There is also a layout. Isn't it supposed to stay inside of its boundaries which are clear in the UI?