Forum
Sign Up
× DataGrid for Qt.C++

Modifying QtitanDataGrid using QSS

9 years 7 months ago #7 by Developer Machines
Unfortunately, QCSS does not allow to change these settings (only qpalette based).

Grid API allows:
Border:

view->options().setBorderStyled(true/false); //Draw border via QStyle or solid.
view->options().setBorderColor(color);
view->options().setBorderWidth(1);

All options are described here - www.devmachines.com/productdocs/grid/gridtableviewoptions.html

customize scroll:

Should be customized via QStyle, we use QStyle to render scrollbars, no way to customize through the grid object.

grid header:
Qtitan::GridTableColumn* column = (Qtitan::GridTableColumn *)view->getColumnByModelColumnName("test");
column->setDecorationColor(Qt::red);
column->setFont(...);
column->setIcon(...);

sort/filter buttons in header (place and icon):
Place can be changed by modifying source code only.

P.S. In QtitanDataGrid 4 will be ability to use Qt-HTML in column's caption (with links). Additionally, you will be able to replace standard grid icons via API. In current version all icon's built-in to the resource file. To change these you have to change *.png and rebuild component.
The following user(s) said Thank You: amabilisa

Please Log in or Create an account to join the conversation.

More
8 years 9 months ago #8 by Oleg
How I can change background color for all "service" fields of grid (column headers, navigator & frozen rows places, etc)? Can I do this via QSS?

Please Log in or Create an account to join the conversation.

More
7 years 11 months ago #9 by Fernando Felix Gutierrez Blanco
I'm interested too in changing grid style with css.
Where can I find a list of classes and attributes that I'm able to change?

Please Log in or Create an account to join the conversation.

  • Not Allowed: to create new topic.
  • Not Allowed: to reply.
  • Not Allowed: to edit your message.
Moderators: Developer Machines
Time to create page: 0.136 seconds

Developer Newsletter

Join our Developer Machines newsletter to get informed on all the latest releases of the commercial components for Qt.C++, Delphi FireMonkey, updates and general knowledges.

Quick Support

Should you need any additional information about our products or licensing, please contact us at the following email addresses:

  • This email address is being protected from spambots. You need JavaScript enabled to view it.

  • This email address is being protected from spambots. You need JavaScript enabled to view it.

Get in Touch

If you would like to purchase our products or services, but don’t know how to do it the right way, please feel free to contact us:

  • This email address is being protected from spambots. You need JavaScript enabled to view it.( any questions related to our products or services )
  • This email address is being protected from spambots. You need JavaScript enabled to view it.( questions related to licensing )