Results 1 to 3 of 3

Thread: help! some questions about QListView

  1. #1
    Join Date
    Apr 2006
    Posts
    12
    Thanks
    3
    Qt products
    Qt3
    Platforms
    Unix/X11

    Red face help! some questions about QListView

    hello,
    1) how to display string completely in an QListView?
    for example, if the string is "Qt Centre Forum"
    My program display " Qt Cent..."

    2) how to hide the column bar?
    My program display like this:
    column1 | column2
    -----------------------
    string1 | string2

    I want it like this:
    string1 | string2


    thank you for your help!



    I am so sorry, I have another problem about this widget:
    3) I want to use key "Up" and "Down" to select items in QListView,
    if I use mouse, it emit SIGNAL clicked( QListViewItem *);
    but if I use keyboard, what signal it emit?
    Last edited by lum; 4th August 2006 at 12:54.

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: help! some questions about QListView

    Quote Originally Posted by lum
    how to display string completely in an QListView?
    Try:
    Qt Code:
    1. listView->setColumnWidthMode ( 0, QListView::Maximum );
    To copy to clipboard, switch view to plain text mode 

    Quote Originally Posted by lum
    how to hide the column bar?
    Try:
    Qt Code:
    1. listView->header()->hide();
    To copy to clipboard, switch view to plain text mode 

  3. #3
    Join Date
    Jan 2006
    Location
    Mountain View, CA
    Posts
    279
    Thanked 42 Times in 37 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: help! some questions about QListView

    Quote Originally Posted by lum
    3) I want to use key "Up" and "Down" to select items in QListView,
    if I use mouse, it emit SIGNAL clicked( QListViewItem *);
    but if I use keyboard, what signal it emit?
    selectionChanged()
    Save yourself some pain. Learn C++ before learning Qt.

Similar Threads

  1. How can I disable the QListView Sorting?
    By darpan in forum Qt Programming
    Replies: 3
    Last Post: 27th June 2006, 10:36
  2. Key Events for QListView
    By bmesing in forum Qt Programming
    Replies: 2
    Last Post: 4th April 2006, 09:29
  3. .gif and .tiff image type in QListView in QT3.3.5
    By darpan in forum Qt Programming
    Replies: 5
    Last Post: 18th March 2006, 04:31
  4. Qt related questions and thoughts about getting job
    By AlexKiriukha in forum General Discussion
    Replies: 4
    Last Post: 26th January 2006, 12:25
  5. Keeping focus at bottom of QListView
    By jakamph in forum Qt Programming
    Replies: 4
    Last Post: 10th January 2006, 14:45

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.