Results 1 to 5 of 5

Thread: Porting a GUI designed in Windows to Mac

  1. #1
    Join Date
    Nov 2010
    Posts
    23
    Qt products
    Qt4
    Platforms
    MacOS X Windows
    Thanks
    2

    Default Porting a GUI designed in Windows to Mac

    Hello everyone,

    I'm wondering what the best way to port the GUI of my Windows program to Mac would be. My program successfully builds and runs on both platforms, but on Mac, the GUI layout and font sizes are much different. I've seen some posts on Google that this is due to the Mac treatment of fonts at a 72 instead of 96 dpi. But is there a simple way to change all the font sizes or correct my layouts for Mac? Note, I'm not too worried about maintaining the Aqua "look and feel," this program is simply a utility I'm designing for my laboratory that needs to also run on a Mac.

    I've attached a picture showing my Settings dialog, in which the layout breaks can be clearly seen.

    Thanks for advice in advance!settings.png

  2. #2
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Wiki edits
    5

    Default Re: Porting a GUI designed in Windows to Mac

    Do you use layouts? How does it come that the text overlaps the table? Can we see the ui file for that part.

  3. The following user says thank you to Lykurg for this useful post:

    lynchkp (23rd April 2011)

  4. #3
    Join Date
    Nov 2010
    Posts
    23
    Qt products
    Qt4
    Platforms
    MacOS X Windows
    Thanks
    2

    Default Re: Porting a GUI designed in Windows to Mac

    Hey Lykburg,

    I use layouts within my group boxes. In windows, the text does not overlap the table whatsoever. This is part of the issue with the Mac port.

    My .ui file was too large to directly attach to the post, so I uploaded it to my webserver:

    http://www.kplynch.com/settingsdialog.ui

    Thanks!

  5. #4
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Wiki edits
    5

    Default Re: Porting a GUI designed in Windows to Mac

    Well, you don't use layouts. That's what I've guessed. Using them partially doesn't help very much because then the container are still positioned absolute and you cant grow or shrink the window. Have a look at the docs on how to use layouts.

    I have modified the first page of the stacked widget that you can imagine how it is done (it is not perfect, since you have put everywhere min and max sizes and I am too lazy to remove them all...): settingsdialog.ui. As a side node to your table: you should consider to move the descriptive row text to the header view of the table.

    Best,

    Lykurg

  6. The following user says thank you to Lykurg for this useful post:

    lynchkp (23rd April 2011)

  7. #5
    Join Date
    Nov 2010
    Posts
    23
    Qt products
    Qt4
    Platforms
    MacOS X Windows
    Thanks
    2

    Default Re: Porting a GUI designed in Windows to Mac

    Thanks a bunch. Obviously I'm going to have to learn a bit more about layouts. The UI file you attached was very informative.

Similar Threads

  1. Porting Qt application from linux to Windows
    By ankit17.ag in forum Qt Programming
    Replies: 5
    Last Post: 12th February 2009, 22:18
  2. Linux to Windows Porting
    By qtprogrammer12345 in forum Qt Tools
    Replies: 1
    Last Post: 23rd May 2008, 08:28
  3. Porting Qt Application from Windows to Linux
    By rajeshs in forum Qt Programming
    Replies: 7
    Last Post: 12th July 2007, 14:30
  4. Porting Qt application on windows from linux
    By safknw in forum Qt Programming
    Replies: 13
    Last Post: 22nd May 2006, 14:11
  5. Porting Qt3 linux app to windows qt4
    By Philip_Anselmo in forum Qt Programming
    Replies: 7
    Last Post: 15th May 2006, 19:44

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.