×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Regular Contributor
    Join Date
    Oct 2008
    Posts
    323

    Question QListview with Checkboxes

    Dear All,

    I used this code to display the QlistView with Check boxes.. it showing some error 's

    QListView view(0);
    //Error:1 view.setResizeMode( QListView::LastColumn );
    //Error:2 view.addColumn( "Filename" );
    view.show();
    QDir dir(".");
    QStringList files = dir.entryList( QDir::Files );
    for( QStringList::Iterator it = files.begin(); it != files.end(); ++it)
    {
    //Error:3 (void)new QCheckListItem( &view, *it, QCheckListItem::CheckBox );
    }
    a.setMainWidget( &view );


    Error's:
    undefined identifier 'QListView::LastColumn' main.cpp

    but i included
    #inlcude <QListView> also but error still showing undefined identifier

    any know how to resolve this?any solutions ?

  2. #2
    Super Contributor
    Join Date
    Oct 2009
    Posts
    4,326

    Re: QListview with Checkboxes

    Quote Originally Posted by damodharan View Post
    //Error:1 view.setResizeMode( QListView::LastColumn );
    According to documentation resizeMode has only two values: Fixed and Adjust
    http://doc.trolltech.com/4.6/qlistvi...esizeMode-prop
    http://doc.trolltech.com/4.6/qlistvi...esizeMode-enum

    Quote Originally Posted by damodharan View Post
    //Error:2 view.addColumn( "Filename" );
    QListView doesn't have a method with name addColumn().
    http://doc.trolltech.com/4.6/qlistview-members.html

    Quote Originally Posted by damodharan View Post
    //Error:3 (void)new QCheckListItem( &view, *it, QCheckListItem::CheckBox );
    There is no such class QCheckListItem only Q3CheckListItem, which should not be used in newly written code as this is Qt 3 legacy.

Similar Threads

  1. Replies: 2
    Last Post: 2010-01-28, 18:48
  2. CheckBoxes
    By amerzannouneh in forum Symbian User Interface
    Replies: 5
    Last Post: 2008-10-14, 16:20
  3. [moved] About Combobox and checkboxes in low level.
    By EaswaraNayudu in forum Mobile Java General
    Replies: 3
    Last Post: 2008-07-15, 13:15
  4. checkboxes in listbox
    By vickey in forum Symbian
    Replies: 3
    Last Post: 2007-12-17, 06:48
  5. Checkboxes for Nokia 9210
    By srinath_ramaraju in forum Symbian
    Replies: 0
    Last Post: 2002-07-10, 06:35

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×