C
C
Clean Coder2019-04-29 15:30:35
Qt
Clean Coder, 2019-04-29 15:30:35

How to make the context menu item active only on certain QTreeView columns?

Hello. A question. There is a table QTree View, consisting of several columns. And there is a context menu for this table. How can I make sure that certain menu items are active only on certain columns, and deactivated on the rest?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
J
Jacob E, 2019-04-30
@Zifix

I haven’t used widgets for a thousand years, and I don’t remember how it works there, but in theory it can be controlled through logic in its QItemDelegate successor delegate.
Or maybe a separate role in the model that will store enum with menu display options.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question