Results 1 to 5 of 5

Thread: centering combobox text

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    May 2007
    Posts
    6
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: centering combobox text

    Hi,
    I have a similar problem, but with a non editable combobox. The list of items is correclty centered, but since there is no lineEdit in a non editable combo box, I can't recenter the currently selected item. Any idea ? Thx !

  2. #2
    Join Date
    May 2007
    Posts
    6
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: centering combobox text

    Ok, just found the solution. Like jpn posted above, you _must_ have your combobox configured with setEditable(true), but you then you have to disable user input by setting the lineEdit to read-only. Thx jpn !

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

    Mesozoic (16th August 2012)

Similar Threads

  1. Unhandled exception in qatomic
    By NewGuy in forum Qt Programming
    Replies: 14
    Last Post: 23rd July 2013, 09:49
  2. Text block centering in Qt4.4 QTextEdit
    By mla1290 in forum Qt Programming
    Replies: 3
    Last Post: 10th July 2008, 17:46
  3. Match the text beetween two string
    By dreamer in forum Qt Programming
    Replies: 4
    Last Post: 20th May 2008, 14:48
  4. Replies: 8
    Last Post: 15th May 2007, 09:21
  5. Editable text in QGraphicsView
    By wysota in forum Qt Programming
    Replies: 8
    Last Post: 24th February 2007, 15:30

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.