Results 1 to 3 of 3

Thread: QTreeWidget Custom Editor Question

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Oct 2008
    Posts
    37
    Thanked 2 Times in 2 Posts

    Default QTreeWidget Custom Editor Question

    Hi,

    This has been driving me crazy since I can't seem to track down where it's happening. So I have a QTreeWidget with a custom delegate for the item edit. I've subclassed QLineEdit to create my own editor. Now, when I go to edit the item - the font shrinks just a tiny bit. I've tried changing the size policy and the font in the constructor for my custom editor. It doesn't seem to affect anything.

    So my question is....how do I go about keeping the font consistent in the QTreeView as well as in the custom editor?

    Thanks.

  2. #2
    Join Date
    May 2007
    Location
    Lublin, Poland
    Posts
    345
    Thanks
    40
    Thanked 8 Times in 4 Posts
    Qt products
    Qt3 Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QTreeWidget Custom Editor Question

    Do you have the same font set for both edits and tree widget items ?
    Qt allows you to use everything you want
    wysota
    --------------------------------------------------------------------------------
    #if defined(Q_OS_UNIX) && defined(QT_DEBUG)
    abort(); // trap; generates core dump
    #else
    exit(1); // goodbye cruel world
    #endif

  3. #3
    Join Date
    Oct 2008
    Posts
    37
    Thanked 2 Times in 2 Posts

    Default Re: QTreeWidget Custom Editor Question

    Sorry for the delay in the reply - but yes. I just double checked to make sure. They're both set to Sergio 9 point.

Similar Threads

  1. Replies: 2
    Last Post: 16th May 2008, 14:39
  2. QTreeWidget (Row Check, Custom Sort)
    By AaronMK in forum Qt Programming
    Replies: 3
    Last Post: 8th January 2008, 15:55
  3. resizing a QTreeWidget
    By drhex in forum Qt Programming
    Replies: 6
    Last Post: 27th October 2006, 22:32

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.