Results 1 to 12 of 12

Thread: problem with Tool button n Layout

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jul 2007
    Posts
    39
    Thanks
    10

    Default Re: problem with Tool button n Layout

    Use this one.
    The layout got pretty complex, but it works.
    I did not get you. Use which one? Did you attach any file to the message. I do not see it. If you dont mind can you attach it again.

    May I suggest that instead of using two columns of buttons use only one and select with a combo box or a check box whether you're modifying the stroke or fill color?
    Thanks for the suggestion. But I still would like it this way.

  2. #2
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    2,744
    Thanks
    8
    Thanked 541 Times in 521 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: problem with Tool button n Layout


    Sorry. I forgot to upload it. Must be the heat.

    Here's the attachment too.

    Regards
    Attached Files Attached Files

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

    arjunasd (24th July 2007)

  4. #3
    Join Date
    Jul 2007
    Posts
    39
    Thanks
    10

    Default Re: problem with Tool button n Layout

    Thanks a lot. It works perfect now.

    Also, one final question: How to make the dialog to have a fixed size. I made the sizepolicy to be [Fixed,Fixed,0,0] but still it grows.

    So I am not sure how to make it of fixed size?

    Thanks
    Arjun

  5. #4
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    2,744
    Thanks
    8
    Thanked 541 Times in 521 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: problem with Tool button n Layout

    Use the following code in the constructor of the QDialog subclass:

    Qt Code:
    1. setFixedSize(sizeHint());
    To copy to clipboard, switch view to plain text mode 
    This is a common solution.

    Another, better solution, but requires a top level layout (you have one ), is:
    Qt Code:
    1. layout()->setSizeConstraint(QLayout::FixedSize);
    To copy to clipboard, switch view to plain text mode 
    This will keep the dialog at a fixed size, but it will also adjust the size in some situations, like when the system font changes.

    Regards

  6. #5
    Join Date
    Jul 2007
    Posts
    39
    Thanks
    10

    Default Re: problem with Tool button n Layout

    Great help man. Thanks a lot.

  7. #6
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    2,744
    Thanks
    8
    Thanked 541 Times in 521 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: problem with Tool button n Layout

    You're welcome.

Similar Threads

  1. Grid Layout Problem
    By Seema Rao in forum Qt Programming
    Replies: 2
    Last Post: 4th May 2006, 12:45
  2. Push Button problem!!
    By Seema Rao in forum Qt Programming
    Replies: 1
    Last Post: 22nd April 2006, 16:31
  3. Facing problem with tool bar icons
    By jnana in forum Qt Programming
    Replies: 4
    Last Post: 20th April 2006, 08:37
  4. Layout Problem
    By Seema Rao in forum Qt Programming
    Replies: 4
    Last Post: 19th April 2006, 11:08

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.