QTableView add Rows renders wrong
-
I tested it now with another Widgets and the Problem is still existing. So its not a Problem with only QComboBox. So it seems its a generally Problem with rendering. I have a similar Widget like in the StarDelegate Example and the Problem occurs. I tried not to modiy the QPainter but the Problem still exists. I also deleted the QTableView and created a new One.
Any other Ideas?
-
Hi
I newer say such issue with
https://wiki.qt.io/Combo_Boxes_in_Item_ViewsI think you ask it to draw in wrong position with
painter->deviceTransform().map(option.rect.topLeft()))You should check the y pos when its drawing wrongly.
Else it look ok from fast glance.
-
@mrjj said in QTableView add Rows renders wrong:
painter->deviceTransform().map(option.rect.topLeft()))
If i delete this part the Problem still exists. I took a look at your Link. In this Example there is no paint Event and im wondering. How does the Delegate know how to paint the Element?
If i remove the render Part the ComboBox isnt shown.
I think its a Problem with the Painter or the Renderfunction. Or perhaps something in my Layout.
Update:
It looks like its a Layout Problem. When i switch the Buttons to the Upper i dont have that Problem.
But why? Its a normal Gridlayout with a normal Row under the QTableView.
-
Can you show the code that setup everything including the buttons ?
-
Then can you provide a minimal compilable example so people can test that locally to help find the problem ?
-
I have made the Project Public in my Repository for some Days.
https://git.kubitox.com/Ben/KT
The Problem is in "Medikamentenplan" the below part. The Problem occurs in DoctorContact
-
I can't reproduce the defect you have on macOS.
On a side note, you should review that code base, I had to fix several errors before being able to run your application.
-
I installed a Virtual Machine with Linux and tested it. You are right, on other OS it isnt there. Maybe a Problem with Windows. But i dont know how to fix that now. Im using QT 5.9.1 and MSVC 2015 with 64-bit.
Could it be that the Problem is a Driver Problem?
-
Maybe a glitch in the Windows style.