[C++] QTableView, how to remove cell padding?

Joined
May 3, 2023
Messages
6
Reaction score
0
Hello,
I am developing an application using Qt to build the interface.
I have bought a new PC where I have installed a new environment and with the exact same code I get a different UI visualization as you can see in the following image.
The cells are now shown with some padding and rounded borders.

The differences between the two environments are:
Windows SDK 10 for the old, 11 for the new
Qt 6.2 for the old, 6.7 for the new.

Which of those is responsible for the visualization difference?
Would I want to stay updated and going on with the new versions, how do I get rid of the paddings and rounded corners?
I'm not able to find any method both in QTableView and QTableWidget to manage those aspects.

Edit: just to be clear, both of the screenshots heve been taken running the software on the same PC, but the first is a version compiled on the old PC, the second is compiled on the new one using the same code.
 

Attachments

  • qtable.jpg
    qtable.jpg
    111.3 KB · Views: 6
Last edited:
Joined
May 3, 2023
Messages
6
Reaction score
0
I have found out that the responsible is Qt 6.7 which has changed the theme for Windows 11 to support dark mode switch and other.
Now, I am thinking to manage the table's style using css: is there any list of available css selectors for QTableView?
Reading the docuementation I can only find a few as example.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,818
Messages
2,569,727
Members
45,664
Latest member
Phil79581

Latest Threads

Top