Forum > QT
[solved] TFrame + TTabSheet
(1/1)
andyH:
I have posted on a similar topic and not had any useful response. I have a sample project to demonstrate:
Main form + TPageControl with tabsheets. A TFrame as a container for a number of objects that sit on the tabsheet. Compiles and runs okay with GTK - screenshot (deliberately set the frame colour red).
Compile with QT and not okay - screenshot. It appears as if the TFrame is not rendered on the tabsheet. FButton is a button on the tabsheet - to confirm that QT will display objects on a tabsheet. With GTK FButton is hidden behind the TFrame.
I had previously tried this with a TPanel and got the same behaviour, switched from a TPanel as a container to a TFrame - no change.
I've attached the sample project.
I'm running Linux Mint 20.3 with Lazarus 2.0.10 and have installed libqt5pas version 2.9 (https://github.com/davidbannon/libqt5pas/releases/tag/v1.2.9).
Is it me or a bug?
zoltanleo:
Hey andyH
I have no problem on win32 with frame as container
zeljko:
It works here BUT change Anchors and Width/Height with align:
TestFrame:= TFrame2.Create(self);
//with TestTab do
with TestFrame do
begin
Align := alClient;
// Anchors:=[akLeft,akTop,akRight,akBottom]; //dont think does anything.
Parent:= PageCtrl.Page[0];
//Width:= Parent.ClientWidth;
//Height:= Parent.ClientHeight;
end;
andyH:
@zeljko - thanks
Made the changes, from:
--- Code: Pascal [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} --- with TestFrame do begin Anchors:=[akLeft,akTop,akRight,akBottom]; //dont think does anything. Parent:= PageCtrl.Page[0]; Width:= Parent.ClientWidth; Height:= Parent.ClientHeight; end;to
--- Code: Pascal [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} --- with TestFrame do begin Align := alClient; Parent:= PageCtrl.Page[0]; end;and it worked. Although why it was okay with GTK2 and not QT5, don't know.
So simple, but I suspect I would not have found that on my own.
Thanks again.
Navigation
[0] Message Index