Results 1 to 7 of 7

Thread: font size difference in embedded QT

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Oct 2011
    Posts
    1
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Default Re: font size difference in embedded QT

    Thanks for help. I apply this function to MainWindow and it works well:

    Qt Code:
    1. void translateFontSize( QWidget *ui )
    2. {
    3. QObjectList l;
    4. QObject *w;
    5.  
    6. if (!ui)
    7. return;
    8.  
    9. QFont font = QFont(ui->font());
    10. font.setPointSize( (font.pointSize() *4) / 3);
    11. ui->setFont(font);
    12.  
    13. l = ui->children();
    14.  
    15. foreach (w, l) {
    16. QWidget *ww = dynamic_cast<QWidget *>(w);
    17. if (ww) {
    18. translateFonts( ww );
    19. }
    20. }
    21. }
    To copy to clipboard, switch view to plain text mode 

  2. #2
    Join Date
    Apr 2010
    Posts
    9
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Windows

    Default Re: font size difference in embedded QT

    Dear rvonau,

    I'm interesting in your solution to font resizing in embedded systems. I'd like to test your solution; I've a question about your function: what about "translateFonts"? Could you explain me this? I copy directly your function and, compiling it, TranslateFonts obvioulsy appears to be not declared.
    Could you give an idea about TranslateFonts?
    Thanks
    Paolo

Similar Threads

  1. Replies: 3
    Last Post: 9th April 2013, 14:24
  2. Font problem in Qt embedded 4.4.3 on Arm device
    By rahman.duran in forum Qt for Embedded and Mobile
    Replies: 1
    Last Post: 16th April 2009, 00:30
  3. adjust font size to QLabel-size
    By hunsrus in forum Qt Programming
    Replies: 0
    Last Post: 9th July 2008, 14:33
  4. embedded font/locale problems
    By GW in forum Qt for Embedded and Mobile
    Replies: 3
    Last Post: 10th October 2007, 15:42
  5. change font size and button size of QMessageBox
    By nass in forum Qt Programming
    Replies: 6
    Last Post: 13th September 2006, 19:16

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.