Results 1 to 5 of 5

Thread: Contents not Properly Visible in QComboBox

  1. #1
    Join Date
    Jan 2007
    Posts
    326
    Thanks
    42
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    MacOS X

    Default Contents not Properly Visible in QComboBox

    Hi all

    Working on Qt4.1 on my Intel Mac machine.

    My problem is this , The length of the QComboBox is small as compare to the contents in it, while using this in my program i wont be able to view its contents properly.

    For eg. Suppose I have added this String in QComboBox "/dev/rdisk0 (WDC WD2500AAJS-41RYA0 Media,232.89 GB)",

    Now while running the program ,When i click upon combo , The name of the above String is Partiallly visible to me. that is "/dev/rdisk0 (WDC "
    Because the length of the ComboBox I have taken is this much.

    For this I also used ,Combo->setSizeAdjustPolicy(QComboBox::AdjustToContents ); but It wont works

    Is there any other way to make it adjustable.

    Kindly help me

    Thanx
    Always Believe in Urself
    Merry

  2. #2
    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: Contents not Properly Visible in QComboBox

    Did you put the combobox in a proper layout so that it resizes when you resize the window?

  3. #3
    Join Date
    Jan 2007
    Posts
    326
    Thanks
    42
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    MacOS X

    Default Re: Contents not Properly Visible in QComboBox

    Thanx for the reply.

    The width of the window is small.

    But i dont have to resize the window..,

    the size of the window should be fixed , and the Combo Box on it is also fixed ,
    Always Believe in Urself
    Merry

  4. #4
    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: Contents not Properly Visible in QComboBox

    But if you don't put the combobox in a layout, it won't adjust to its contents because its sizeHint will be ignored (it is the layout that controls widget sizes so if you don't have one, your widgets won't adjust to contents).

  5. #5
    Join Date
    Jan 2007
    Posts
    326
    Thanks
    42
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    MacOS X

    Default Re: Contents not Properly Visible in QComboBox

    Thanx for the reply , I 'll try this and then update you
    Always Believe in Urself
    Merry

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.