Results 1 to 2 of 2

Thread: Questions on Pie chart example

  1. #1
    Join Date
    Aug 2009
    Posts
    56
    Thanks
    14
    Thanked 1 Time in 1 Post

    Default Questions on Pie chart example

    From http://doc.trolltech.com/4.3/itemviews-chart.html

    I'd like to design a window in QT Designer rather than designing the window all in code. But I can't figure out

    1. How do I set the splitter? I don't see any splitter widget in QT designer
    2. I can place the table view, but not the pie chart, since the former exists as an option in QT designer while the latter does not. Is there a way I can get that pie chart to be a widget I can drag in QT designer?

    Thanks

  2. #2
    Join Date
    Aug 2009
    Posts
    56
    Thanks
    14
    Thanked 1 Time in 1 Post

    Default Re: Questions on Pie chart example

    Also, the sort function doesn't do anything.

    Qt Code:
    1. tableView.setSortingEnabled(true);
    2. tableView.sortByColumn(valueColumn,Qt::DescendingOrder);
    To copy to clipboard, switch view to plain text mode 

    When I traced it down, it went to

    Qt Code:
    1. void QAbstractItemModel::sort(int column, Qt::SortOrder order)
    2. {
    3. Q_UNUSED(column);
    4. Q_UNUSED(order);
    5. // do nothing
    6. }
    To copy to clipboard, switch view to plain text mode 

    I guess that means displaying the data sorted would actually sort the SQL table? I don't want to change the table, I just want to display the data sorted.

    Besides that, I'm using QSqlQueryModel because I want the user to be able to type in arbitrary queries. setQuery is protected with QSqlTableModel

Similar Threads

  1. Draw a bar chart inisde the QScrollArea
    By ultrasonic in forum Qt Programming
    Replies: 6
    Last Post: 9th August 2012, 20:06
  2. A couple of questions on installing Qt 4.5 on Windows Xp
    By rishiraj in forum Installation and Deployment
    Replies: 2
    Last Post: 3rd April 2009, 07:44
  3. Who gets questions answered and who doesn't?
    By gjshannon in forum General Discussion
    Replies: 15
    Last Post: 19th March 2009, 21:02
  4. Memory management questions (im new to Qt)
    By scarvenger in forum Qt Programming
    Replies: 2
    Last Post: 6th May 2007, 07:41
  5. Qt related questions and thoughts about getting job
    By AlexKiriukha in forum General Discussion
    Replies: 4
    Last Post: 26th January 2006, 12:25

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
  •  
Qt is a trademark of The Qt Company.