[Interest] ComboBox styling problems

Jason H jhihn at gmx.com
Tue Apr 10 06:09:43 CEST 2018


Thanks for all of that JP, I'm still digesting some of that, but I cannot figure out where the partial opacity black overlay is coming from?

1) it does not follow the positioning of the highlight (see attached) 
2) I can't change it's color or opacity. 

I agree with "so perhaps consider visualizing the highlighted state in the delegate background instead." But I want go get whatever that partial opacity black is under my control. 


> Sent: Monday, April 09, 2018 at 2:59 PM
> From: "J-P Nurmi" <jpnurmi at qt.io>
> To: "interestqt-project.org" <interest at qt-project.org>
> Subject: Re: [Interest] ComboBox styling problems
>
> > On 27 Mar 2018, at 03:41, Jason H <jhihn at gmx.com> wrote:
> > 
> > I sent this a while back, but I never got help, and I still haven't figured it out. 
> > 
> > -----
> > I'm trying to style ComboBox, but I am getting a highlight that is not placed correctly, and there seems to be a semi-transparent black overlay that is also applying itself over the highlight?
> > 
> > Can someone tell me what I'm doing wrong?
> 
> Some comments to get you started:
> - Fix the "width: control.height" bindings.
> - In the delegate, use Text as a contentItem, and Rectangle as a background. Control controls the size of contentItem, and background follows the size of the Control by default. No need for width/height bindings for either.
> - If you want to use fontSizeMode, specify the font size range: http://doc-snapshots.qt.io/qt5-5.11/qml-qtquick-text.html#fontSizeMode-prop
> - Set a higher Z-value if you want the ListView highlight to appear over the delegates: https://doc-snapshots.qt.io/qt5-5.9/qml-qtquick-listview.html#stacking-order-in-listview but you will be just hiding the entire delegate with an opaque rectangle, so perhaps consider visualizing the highlighted state in the delegate background instead.
> - What's the purpose of the opaque Rectangle inside the ScrollIndicator?
> 
> --
> J-P Nurmi
> 
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screen Shot 2018-04-09 at 11.52.54 PM.png
Type: image/png
Size: 8139 bytes
Desc: not available
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20180410/f0a0b6f8/attachment.png>


More information about the Interest mailing list