Results 1 to 5 of 5

Thread: PushButton height problem

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Riverside, Rhode Island, USA
    Posts
    245
    Thanks
    52
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: PushButton height problem

    Looking at "sizePolicy" did not help in designer, but changing the font to "Century Schoolbook L" did. ?????????

    I have not had any success with the program that doesn't use designer. I don't understand how or where I should use "setSizePolicy(??)" .

    A lot of Qt's documentation is beyond my capability to decipher, particularly Qt-4's.

    This is my code
    Qt Code:
    1. layoutButtonBox = new QHBoxLayout();
    2. buttonGroup = new QButtonGroup( this );
    3. pb1 = new QPushButton ( "F1", this );
    4. pb1->setFont(my);
    5. pb1->setFixedHeight(28);
    6. layoutButtonBox->addWidget( pb1 );
    7.  
    8. pb2 = new QPushButton( "F2", this );
    9. pb2->setFont( pb );
    10. pb2->setFixedHeight(28);
    11. layoutButtonBox->addWidget( pb2 );
    To copy to clipboard, switch view to plain text mode 
    changing the font here "my" to "pb" did not help.
    thanks

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

    Default Re: PushButton height problem

    Looks like you have some font problems. size policies won't help you with that.

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

    impeteperry (29th January 2007)

Similar Threads

  1. QTextEdit height using Qt3.3.5
    By vermarajeev in forum Qt Programming
    Replies: 3
    Last Post: 15th December 2006, 08:43
  2. Facing problem with Q3Canvas
    By jnana in forum Qt Programming
    Replies: 3
    Last Post: 6th May 2006, 07:00
  3. height()
    By mickey in forum Newbie
    Replies: 1
    Last Post: 22nd March 2006, 20:32
  4. fftw problem
    By lordy in forum General Programming
    Replies: 1
    Last Post: 16th March 2006, 21:36
  5. Replies: 16
    Last Post: 7th March 2006, 15:57

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.