PDA

View Full Version : Is this impossible with PyQt4?



blanchoir
27th July 2011, 20:20
Hello everyone, I will provide a picture of what I need to be done and let me know if it's possible. Thank you

What I have done so far is I set the winodw shape using QPixMap, SetMask but it comes out very sharp aliased edges. I saw Spotify's GUI and it looks very smooth, what I concluded is that they hardly even use QT itself, everything they made is from scratch of their own libraries which takes months and years to develop. So I am starting to feel a little down as to what PyQt can actually do here.

http://i56.tinypic.com/xqbymt.jpg

alexandernst
27th July 2011, 21:20
QSS can get you that UI (or even prettier). Only thing that you'd need "to do yourself" is the close/maximize/minimize buttons (and hide the title bar).

blanchoir
27th July 2011, 21:40
QSS can get you that UI (or even prettier). Only thing that you'd need "to do yourself" is the close/maximize/minimize buttons (and hide the title bar).

Qt Style Sheets correct?

If i did use PyQt I would have to make every widget myself. How would i make the file menu? I made a file menu with some paddding, it came out perfect, however towards the top right corner I cant add the close max, minimize buttons, cause nothing can hover over the Menu Bar..

Do you have any examples of something like this being done with source code available.

Thank you so much for the reply Alex

blanchoir
28th July 2011, 00:10
Any help? Please?

This is very fraustrating, I came into this framework thinking there might be atleast a reference guide, or help..

My end goal:

A nice gui like Spotify.

Talei
28th July 2011, 02:21
For the colour and gradients use stylesheets and for round corners ... paint it yourself.
Basically what You will need to do is overwrite paintevent, resize, and handle title bar with close/max/min buttons. Use setWindowFlags(Qt::FramelessWindowHint); to get "flat surface" and go from there.

This (http://qt.developpez.com/tutoriels/braindeadbzh/customwindow/) article will be very helpful for You. AFAIK there is no out of the box solution for this because You will need "embed" that style into Your app with = a loot of sub-classing and doing stuff from scratch yourself.