Results 1 to 9 of 9

Thread: QXListView - 'Active List' Demo

  1. #1
    Join Date
    Jan 2006
    Location
    Earth (Terra)
    Posts
    87
    Thanks
    4
    Thanked 6 Times in 4 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows Symbian S60

    Default QXListView - 'Active List' Demo

    Hi, all -

    'QXListView' is what I call an 'active list view' - certain cells respond directly to clicks and look like system widgets - checkboxes, radiobuttons, etc.

    For more information, you can see my blog entry here (Mac OS X/Win/Linux).

    You can download the source code and working demos here.

    I'll try to get some screenshots up, shortly.

    I'm seeing some issues on my Linux (Ubuntu VM under Parallels on Mac) that I think are local. Some feedback on this appreciated.

    Anyway, let me know what you think.

    Thanks,
    rickb

  2. #2
    Join Date
    Jan 2006
    Location
    travelling
    Posts
    1,116
    Thanks
    8
    Thanked 127 Times in 121 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QXListView - 'Active List' Demo

    The use of absolute path is a qmake project is somewhat weird and annoying (clearly unwise IMO...) and there are many include errors due to case sensitivity under Linux... Remember the only two valids include schemes for Qt headers are suffixed lowercase and not suffixed class-like capitalized names... Mixing both may work on some platforms but not on all...

    Anyway I got the example building and running. Looks like it's working but I must say I don't see what's so special about it. Is there more to it than a tree view with a custom model and custom(s) delegate(s) that I missed?
    Does the interest lie in the API (I admittedly did not take time to browse the sources...)?
    Current Qt projects : QCodeEdit, RotiDeCode

  3. #3
    Join Date
    Jan 2006
    Location
    Earth (Terra)
    Posts
    87
    Thanks
    4
    Thanked 6 Times in 4 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows Symbian S60

    Default Re: QXListView - 'Active List' Demo

    Quote Originally Posted by fullmetalcoder View Post
    The use of absolute path is a qmake project is somewhat weird and annoying (clearly unwise IMO...)
    Ack. Sorry about that - I left the intermediate /Qt/ directory in the .pro file. If you get rid of that (and define $DEV per the instructions), the .pro file should be smart enough to figure out the rest.

    and there are many include errors due to case sensitivity under Linux... Remember the only two valids include schemes for Qt headers are suffixed lowercase and not suffixed class-like capitalized names... Mixing both may work on some platforms but not on all...
    Hmm. It built on my installs of Windows, Mac and Linux. Some of the includes are legacy from the 3.x version. I'll look at them.

    Anyway I got the example building and running. Looks like it's working but I must say I don't see what's so special about it. Is there more to it than a tree view with a custom model and custom(s) delegate(s) that I missed?
    Does the interest lie in the API (I admittedly did not take time to browse the sources...)?
    Did you try clicking on the checkboxes, radio buttons, pixmaps in the columns? They should behave as system-type widgets (but aren't). Clicking on the lightbulbs should show third state in the parents, clicking on the lightbulbs header should toggle all the lightbulbs.

    You're running on Linux (according to your sig) - I'm having troubles with my Linux installation and can't tell if it's working correctly, there. Might have to bump that up, somehow (VM Ubuntu is giving me spurious events.) (Right now I'm arm-wrestling a Coin3D build of SoQt on the Mac, so my time is constrained.)

    (I guess any Model/View app is a view with a custom model and potentially custom delegates... no? I dunno. It seemed to be beastly difficult to get this somewhat simple kind of functionality in Qt3, it certainly was not obvious in Qt4 [to me, anyway].)

    thanx,
    rickb

  4. #4
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: QXListView - 'Active List' Demo

    Quote Originally Posted by fullmetalcoder View Post
    Remember the only two valids include schemes for Qt headers are suffixed lowercase and not suffixed class-like capitalized names... Mixing both may work on some platforms but not on all...
    Well actually, it's perfectly valid to mix those two schemes. If you take a look at various Qt source files you'll see that Qt itself does so. Every proper Qt installation on all supported platforms has both header file types. Non-suffixed camel cased - so called convenience header files - are there just to forward the inclusion to corresponding suffixed lower cased header files.
    J-P Nurmi

  5. #5
    Join Date
    Jan 2006
    Location
    Earth (Terra)
    Posts
    87
    Thanks
    4
    Thanked 6 Times in 4 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows Symbian S60

    Default Re: QXListView - 'Active List' Demo

    Quote Originally Posted by jpn View Post
    Well actually, it's perfectly valid to mix those two schemes. If you take a look at various Qt source files you'll see that Qt itself does so. Every proper Qt installation on all supported platforms has both header file types. Non-suffixed camel cased - so called convenience header files - are there just to forward the inclusion to corresponding suffixed lower cased header files.
    Crawling around in the source, that's what I noticed, as well.

    Thanx,
    rickb

  6. #6
    Join Date
    Jan 2006
    Location
    travelling
    Posts
    1,116
    Thanks
    8
    Thanked 127 Times in 121 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QXListView - 'Active List' Demo

    Quote Originally Posted by jpn View Post
    Every proper Qt installation on all supported platforms has both header file types. Non-suffixed camel cased - so called convenience header files - are there just to forward the inclusion to corresponding suffixed lower cased header files.
    I've been using prebuilt packages for the last three distros I used and none of them featured mixed includes... I guess they've removed them AFTER building the bins. Better to have it working on all possible configurations anyway.
    Current Qt projects : QCodeEdit, RotiDeCode

  7. #7
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: QXListView - 'Active List' Demo

    Quote Originally Posted by fullmetalcoder View Post
    I've been using prebuilt packages for the last three distros I used and none of them featured mixed includes... I guess they've removed them AFTER building the bins. Better to have it working on all possible configurations anyway.
    Erm, what do you actually mean with mixed includes? Both of these work on every supported platform:
    Qt Code:
    1. #include <QObject>
    2. #include <qobject.h>
    To copy to clipboard, switch view to plain text mode 
    However, due to case sensitive file systems, you cannot do something like this:
    Qt Code:
    1. #include <qobject>
    To copy to clipboard, switch view to plain text mode 

    As already stated, include <QObject> does nothing but further includes <qobject.h>. Lower case header files simply cannot be removed. Without them you have no declarations at all. And why would any distro remove convenience headers?

    What you say makes no sense to me. It would mean that it was never safe to use either include scheme.
    J-P Nurmi

  8. #8
    Join Date
    Jan 2006
    Location
    Earth (Terra)
    Posts
    87
    Thanks
    4
    Thanked 6 Times in 4 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows Symbian S60

    Default Re: QXListView - 'Active List' Demo

    I might be doing the latter - although it builds on all three platforms in my environment. I'll check, again, but not for a bit. I'm a bit buried in the process of making a big demo for a prospective client.

    Later,
    rickb

  9. #9
    Join Date
    Jan 2006
    Location
    travelling
    Posts
    1,116
    Thanks
    8
    Thanked 127 Times in 121 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QXListView - 'Active List' Demo

    Quote Originally Posted by jpn View Post
    Erm, what do you actually mean with mixed includes?
    Well, basically this :
    Quote Originally Posted by jpn View Post
    Qt Code:
    1. #include <qobject>
    To copy to clipboard, switch view to plain text mode 
    Remember the only two valids include schemes for Qt headers are suffixed lowercase and "not suffixed" class-like-capitalized names... Mixing both may work on some platforms but not on all...
    I thought my above statement had been clear enough as to where the problem lies but I may have missed something due to my poor english skills... If so please let me know. Actually I don't think any files were removed. This was just a supposition I made after reading your previous post a bit too fast...

    Hoping it makes more sens to you now.
    Current Qt projects : QCodeEdit, RotiDeCode

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.