It is possible to configure the QWebView to work with "Elide" disabled (equivalent to Qt::ElideNone)?

The "Elide" graphic texts being compressed (elieded) to fit inside the select.

Example: enter image description here

I wish the entire text to be displayed when clicked on comobox (selectbox). Is it possible?

Thanks.

[edit] I think it may be the way the styleSheet (qt):

QComboBox QAbstractItemView {
   ...
}

I just do not know which property to use styleSheet disable "elited".

Maybe something like this:

QComboBox QAbstractItemView {
   elided: none;
  ...or...
   elide: none;
}

Anyone know a link with all properties stylesheets used in QT (I searched but did not find)?

[edit 2]

I tried white-space: pre; and white-space: nowrap; that seems the most logical, but does not work with QAbstractItemView, will be the selector is another?

有帮助吗?

解决方案

You can change the textElideMode property by adding a rule QComboBox QAbstractItemView { qproperty-textElideMode: ElideNone } (See Style Sheet Syntax - Setting QObject properties) but it will only clip the text on the right without extending the drop-down box.

According to the code source, the list view adjust its size to its content when it is displayed as a popup which is done by adding this in the stylesheet:

QComboBox {
    combobox-popup: true;
    // To make room for the possible scrollbar 
    // (the value has to match the scrollbar width of the current style/platform)
    padding-right: 20px;
}

Outside that popup mode, the width of the drop-down box is taken from the list view minimum size (or from the min-width css property of the QAbstractItemView), but there doesn't seem to be a way, with css only, to automatically adjust the size of the drop-down box to the content of the list.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top