Page 2 of 2 FirstFirst 12
Results 21 to 40 of 40

Thread: Platform independent GUI

  1. #21
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Platform independent GUI

    One final question - do you use layouts in your applications?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  2. #22
    Join Date
    Jun 2007
    Location
    India
    Posts
    1,042
    Thanks
    8
    Thanked 133 Times in 128 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Platform independent GUI

    Ahh... no one wins from this man..

  3. #23
    Join Date
    Jan 2007
    Location
    Paris
    Posts
    459
    Thanks
    98
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4 Qt5

    Default Re: Platform independent GUI

    Quote Originally Posted by wysota View Post
    One final question - do you use layouts in your applications?
    I do.

    (10 characters long)

  4. #24
    Join Date
    Nov 2009
    Posts
    3
    Thanks
    1

    Default Re: Platform independent GUI

    Quote Originally Posted by bnilsson View Post
    I am sure this question must have been handled may times, but I have not found any answer in the forum.

    What is the best way to get a platform independent GUI regarding font size, if you have a lack of real estate?
    If I design by Windows Designer the Mac GUI will show label and button fonts too big to suit my layout, and vice versa if I design on Mac they will be too small if I view the resulting GUI on Windows.
    Also, i.e. Arial 12 does not have the same size, on Windows it is really big, on Mac it is small.
    Is there any font that will have a platform independent size?

    Any hints for a strategy?
    Except having completely different ui files for Mac and Windows, which will be a mess to maintain.

    BN
    Why not using images or pixmaps with text?, or font metrics, I didn't use it but maybe it could help you.

  5. #25
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Platform independent GUI

    Quote Originally Posted by bunjee View Post
    I do.
    Why?

    (10 characters long)
    Ditto.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  6. #26
    Join Date
    Jan 2007
    Location
    Paris
    Posts
    459
    Thanks
    98
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4 Qt5

    Default Re: Platform independent GUI

    One word, convenience.

  7. #27
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Platform independent GUI

    Isn't it more convenient not to use it? Simply position widgets on the form and voilla?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  8. #28
    Join Date
    Jan 2007
    Location
    Paris
    Posts
    459
    Thanks
    98
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4 Qt5

    Default Re: Platform independent GUI

    It's simpler to do :

    Qt Code:
    1. layout->addWidget(myWidget);
    To copy to clipboard, switch view to plain text mode 

    than

    Qt Code:
    1. myWidget->move(posX, posY);
    To copy to clipboard, switch view to plain text mode 

  9. #29
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Platform independent GUI

    It's simpler to run Designer and setup everything there.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  10. #30
    Join Date
    Jan 2007
    Location
    Paris
    Posts
    459
    Thanks
    98
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4 Qt5

    Default Re: Platform independent GUI

    There is another thing you're not going to like : I never use Qt Designer.

    :-).

  11. #31
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Platform independent GUI

    Which is strange considering everything you said earlier. Another question in that case - do you allow your users to resize windows of your applications and why?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  12. #32
    Join Date
    Aug 2008
    Location
    Algarve, Portugal
    Posts
    288
    Thanks
    23
    Thanked 32 Times in 28 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60

    Default Re: Platform independent GUI

    Regarding the font size I also notice that size is different in KDE from Gnome, also the lineedit boxes are very smaller in KDE, than in Gnome. I also had problems whit translation. Some setences can become bigger in different languages so in portuguese, my labels where "cutting" the words. I had to enlarge the size of the labels in the Qtdesigner. I'll have to check if there's a way to get the size of the text ant set the label size based on that
    __________________________________________________
    My projects: calculator MathGraphica ; SuperEpicMegaHero game ; GooglePlay ; bitbucket ; github
    Like my projects ? Buy me a kofi

  13. #33
    Join Date
    Sep 2009
    Location
    UK
    Posts
    2,447
    Thanks
    6
    Thanked 348 Times in 333 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Platform independent GUI

    I'd be lost without layouts. I can't be bothered to find out the exact pixel co-ordinates to set all the widgets to, it's far easier to throw in some layout components and let Qt do all the work for me.

  14. #34
    Join Date
    Sep 2009
    Location
    UK
    Posts
    2,447
    Thanks
    6
    Thanked 348 Times in 333 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Platform independent GUI

    Quote Originally Posted by john_god View Post
    I'll have to check if there's a way to get the size of the text ant set the label size based on that
    QFontMetrics ?

  15. #35
    Join Date
    Aug 2008
    Location
    Algarve, Portugal
    Posts
    288
    Thanks
    23
    Thanked 32 Times in 28 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60

    Default Re: Platform independent GUI

    Thanks I'll check that.

    Also I use a lot layouts, they are very usefull.
    __________________________________________________
    My projects: calculator MathGraphica ; SuperEpicMegaHero game ; GooglePlay ; bitbucket ; github
    Like my projects ? Buy me a kofi

  16. #36
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Platform independent GUI

    Quote Originally Posted by john_god View Post
    Some setences can become bigger in different languages so in portuguese, my labels where "cutting" the words. I had to enlarge the size of the labels in the Qtdesigner.
    The only explanation for this is that you didn't use layouts properly or you encountered a known bug (or misfeature) in QLabel related to word wrapping. But if you have word wrapping disabled, you're certainly using layouts incorrectly.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  17. #37
    Join Date
    Jan 2007
    Location
    Paris
    Posts
    459
    Thanks
    98
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4 Qt5

    Default Re: Platform independent GUI

    Quote Originally Posted by wysota View Post
    Which is strange considering everything you said earlier. Another question in that case - do you allow your users to resize windows of your applications and why?
    I tend to limit window resizing to when it's needed. If an application doesn't need to be resized, just don't make that option available.

    Again, if resizing a window gives the user a way to screw up the interface, it's not good.

  18. #38
    Join Date
    Aug 2008
    Location
    Algarve, Portugal
    Posts
    288
    Thanks
    23
    Thanked 32 Times in 28 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60

    Default Re: Platform independent GUI

    Quote Originally Posted by wysota View Post
    The only explanation for this is that you didn't use layouts properly or you encountered a known bug (or misfeature) in QLabel related to word wrapping. But if you have word wrapping disabled, you're certainly using layouts incorrectly.
    There's another explanation, it was late, I was tired and sleppy when I wrote the post, because I have layouts in the main window but not in that particulary dialog ... I need vacations...........
    __________________________________________________
    My projects: calculator MathGraphica ; SuperEpicMegaHero game ; GooglePlay ; bitbucket ; github
    Like my projects ? Buy me a kofi

  19. #39
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Platform independent GUI

    So you were not using layouts properly
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  20. #40
    Join Date
    Aug 2008
    Location
    Algarve, Portugal
    Posts
    288
    Thanks
    23
    Thanked 32 Times in 28 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60

    Default Re: Platform independent GUI

    Nop......

    But last night after posting I start reading again chapter 1 and 2 of "C++ GUI Programming with Qt4".

    AH...... What a great book (thinking out loud: it will never stop amazing me with my ignorance)
    __________________________________________________
    My projects: calculator MathGraphica ; SuperEpicMegaHero game ; GooglePlay ; bitbucket ; github
    Like my projects ? Buy me a kofi

Similar Threads

  1. Replies: 3
    Last Post: 16th June 2009, 08:04
  2. QT Creator, cross platform program.
    By kazek3018 in forum Newbie
    Replies: 8
    Last Post: 20th December 2008, 23:13
  3. Cannot configure -platform win32-msvc2008, no nmake.exe
    By Jason Hamilton in forum Installation and Deployment
    Replies: 3
    Last Post: 1st September 2008, 10:05
  4. Replies: 3
    Last Post: 4th February 2008, 19:28
  5. Crash handler on Win32
    By niko in forum Qt Programming
    Replies: 3
    Last Post: 12th November 2007, 19:41

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.