Qt: Sidebar Qt Creator style

Very simple tutorial about how to develop a dark sidebar like the Qt Creator tool. This is my solution based to stylesheet but same result can be reached in a lot of other ways. However I think this will get a good result with minimal efforts.
The control to use will be a List Widget than create a new window and add a QListWidget control in a side of client area central widget.

Just to show better the final result I added also some items with icon. For obtain a control similar to the Qt Creator sidebar you need to configure the list widget control in icon mode, set the icon order to top to bottom and set the icon size (in this example I used 48x48 icon). Normally the control show a small rectangle around the text of currently selected item. For avoid this simply set the focus rule of the widget to no focus and disable the selectionRectVisible option.

Now the magic stylesheet. Add to the list widget control the following stylesheet tags:
QListWidget { background: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:0, stop:0 rgba(100, 100, 100, 255), stop:1 rgba(150, 150, 150, 255)); border-right: 2px groove gray; } QListWidget::item:hover { background: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:0, stop:0 rgba(150, 150, 150, 255), stop:1 rgba(200, 200, 200, 255)); } QListWidget::item:selected { background: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:0, stop:0 rgba(200, 200, 200, 200), stop:1 rgba(220, 220, 220, 255)); } QListWidget::item { border-bottom: 2px groove gray; padding: 10px; color: white; }
And the result will be the following:

The main difference is the missing shadow under text on the bottom of the icon but, unfortunately, the Qt stylesheet doesn't support shadow text property yet, hope for some future versions. However, consider the very small effort needed, I think this is a good result.
im very impressed with your post because this post is very beneficial for me and provide a new knowledge to me
ReplyDeleteQt Creator 4.15.2 Crack
Wow, amazing block structure! How long
ReplyDeleteHave you written a blog before? Working on a blog seems easy.
The overview of your website is pretty good, not to mention what it does.
In the content!
Qt Creator Crack
Telegram Desktop Crack
Apeaksoft Screen Recorder Crack
Ertugrul Ghazi Crack
Adobe Audition CC Crack
GraphPad Prism Crack
good post.Ertugrul Ghazi Crack
ReplyDeleteI am very happy to read this article. Thanks for giving us Amazing info. Fantastic post.
ReplyDeleteThanks For Sharing such an informative article, Im taking your feed also, Thanks.ipadian-premium-crack/
It solved all my queries perfectly. Our HP Printer offline service is also offered to get your printer offline.
ReplyDeleteOur HP Printer offline service is also offered to get your printer offline.
cinex-hd-crack
ReplyDeleteI was looking for this information from enough time and now I reached your website it’s really good content.
Thanks for writing such a nice content for us.
2020/12/14/microsoft-office-2007-product-key
I like your all post. You have done really good work. Thank you for the information you provide, it helped me a lot. I hope to have many more entries or so from you.
ReplyDeleteVery interesting blog.https://vstmania.net/
<a href="https://serialsoft.org/apeaksoft-screen-recorder-crack/"Serialsoft
<a href="https://serialsoft.org/beecut-crack-2/"Serialsoft
<a href="https://serialsoft.org/rosetta-stone/"Serialsoft
I was looking for this information from enough time and now I reached your website it’s really good content.
ReplyDeleteThanks for writing such a nice content for us.
2020/12/29/winzip-activation-code
I am very happy to read this article. Thanks for giving us Amazing info. Fantastic post.
ReplyDeleteThanks For Sharing such an informative article, Im taking your feed also, Thanks.
windows-firewall-control-crack/
Hi dear, It is really enjoyable to visit your website because you have such an amazing writing style.
ReplyDeleteKMSPico Activator
ReplyDeleteI am very happy to read this article. Thanks for giving us Amazing info. Fantastic post.
Thanks For Sharing such an informative article, Im taking your feed also, Thanks.autodesk-recap-pro-crack/
ReplyDeleteWow! very beautiful, great, and good post. I like it very much.
expertgps registration key full
Thank you for Sharing best Useful information !!!!
ReplyDeleteMachine Learning Training in Bangalore
Data Science Course in Bangalore
I like your all post. You have done really good work. Thank you for the information you provide, it helped me a lot. I hope to have many more entries or so from you.
ReplyDeleteVery interesting blog.
SpyHunter 5 Crack
I like your all post. You have done really good work. Thank you for the information you provide, it helped me a lot. I hope to have many more entries or so from you.
ReplyDeleteVery interesting blog.
Reimage PC Repair Crack