Results 1 to 3 of 3

Thread: Qt listView total height

  1. #1
    Join Date
    Jan 2007
    Location
    Paris
    Posts
    459
    Thanks
    98
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4 Qt5

    Default Qt listView total height

    Hey there,

    I'm using a QListView to display a delegated QStringList.
    Is there a way to get the height of the ListView Scrolling area ?

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Qt listView total height

    Doesn't viewport()->height() work?

  3. #3
    Join Date
    Jan 2007
    Location
    Paris
    Posts
    459
    Thanks
    98
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4 Qt5

    Default Re: Qt listView total height

    I tried that but it doesn't, I guess I have to calculate height myself :/.

    I'm also currently trying to set the QListView background to transparent using this :
    Qt Code:
    1. QPalette palette;
    2. palette.setColor(QPalette::Background, QColor(0, 0, 0, 0));
    3. mListView->setPalette(palette);
    4. mListView->setAttribute(Qt::WA_NoSystemBackground, true);
    To copy to clipboard, switch view to plain text mode 

    Doesn't seem to work either.

    Edit : Solved using this :
    Qt Code:
    1. palette.setColor(QPalette::Base, QColor(0, 0, 0, 0));
    To copy to clipboard, switch view to plain text mode 
    Last edited by bunjee; 18th April 2008 at 19:24.

Similar Threads

  1. How can I get the Systray height ?
    By Nyphel in forum Qt Programming
    Replies: 3
    Last Post: 12th March 2007, 10:04
  2. height()
    By mickey in forum Newbie
    Replies: 1
    Last Post: 22nd March 2006, 21: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.