Results 1 to 4 of 4

Thread: Groupbox and child widget fonts?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Dec 2009
    Posts
    2
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Groupbox and child widget fonts?

    How do I get the child widgets in a group-box to have a different font then the group-box in qt-creator? I have two group-boxes in a horiz layout, one has a tableWidget and the other multiple layouts and controls. After much fiddling I finally have the group-box with the multiple controls working properly however no matter what I do I can't seem to get the tablewidget to render with any font other then the parent groupboxes.

    This problem is further complicated by the fact that when I go Tools->Form Editor->preview in qtcreator I get something totally different then when I build my project and execute it. by totally different I mean different layouts, size hints, fonts, etc....Does anyone know why this might be? Happens with qtcreator 1.2 and 1.3. Also why is the .ui file shown differently when in qtdesigner then in qtcreator design mode?

    Also should mention the generated header file for the ui looks okay, also if I add the following code to my class constructor the font for the tablewidget is still the same as the font for the groupbox. Is this a known bug in Qt?

    Qt Code:
    1. QFont font1;
    2. font1.setPointSize(10);
    3. font1.setUnderline(false);
    4. tableWidgetResults->setFont(font1);
    To copy to clipboard, switch view to plain text mode 
    Last edited by silenuz; 3rd December 2009 at 13:36. Reason: Added more info

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

    Default Re: Groupbox and child widget fonts?

    Please provide a minimal compilable example reproducing the problem.
    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.


  3. #3
    Join Date
    Dec 2009
    Posts
    2
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Groupbox and child widget fonts?

    is attached along with screen-shots.
    Attached Files Attached Files

  4. #4
    Join Date
    Jan 2006
    Location
    Boston, MA
    Posts
    40
    Thanks
    1
    Thanked 6 Times in 6 Posts
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Groupbox and child widget fonts?

    Hmmm, works for me.

    See screenshot.
    Attached Images Attached Images

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.