Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Qt: Philosophical UI Design Dilemma

Tags:

qt

Our desktop application needs to run on Mac, Windows and Linux. That's why we chose Qt. Before, we had three separate code bases for those 3 platforms.

In the old implementation, we drew our own "window caption" with Close, Minimize, Maximize buttons. It looks the same in all three platforms.

This time around, I am not so sure. I thought of letting Qt use whatever's default caption and caption buttons for each platform, the rectangular "X", "_" windows buttons, the round buttons on the left hand side on the mac, and whatever goes with Linux/Ubuntu etc.

Is this a wise decision? One of the things pushing me there is that i'd have to write the resize code for the window class I'm writing, the dragging code, the button work and everything else that comes with writing your own windows caption.

I noticed that if I use this, " Qt::FramelessWindowHint" to remove the caption, i automatically lose my resizing grapple too. Is there a way around that? Also how would you go about implementing your own windows dragging code? (providing you knew the area you'd want to use as a "draggable caption". Seems like I need to catch the button down on that region, enter a drag mode, track the mouse movements and move the windows according to the deltas. Similar for resize. I've done that in other platforms before, but I wanted to ask if Qt has a mechanism that allows me to do that "out of the box"?

like image 670
JasonGenX Avatar asked Feb 03 '11 20:02

JasonGenX


1 Answers

I thought of letting QT use whatever's default caption and caption buttons for each platform

Please do that. As a Mac user, few things are more confusing than "universal" interfaces that are supposed to look the same everywhere. The Windows style interface is confusing. The Mac Style interface is what I'm used to and what I want.

If you have to write (and maintain and support) less code, that's even better.

Just go with "native" as much as possible. Write as little code as possible.

like image 67
S.Lott Avatar answered Oct 02 '22 20:10

S.Lott