Results 1 to 2 of 2

Thread: How to use QGenericMatrix for dynamic rows and columns?

  1. #1
    Join Date
    Dec 2006
    Posts
    426
    Thanks
    8
    Thanked 18 Times in 17 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default How to use QGenericMatrix for dynamic rows and columns?

    Hi,

    I need to create a matrix whose rows and columns are computed dynamically, so I need to create a matrix such as
    Qt Code:
    1. int rows = calcRows();
    2. int cols = calcCols();
    3. QGenericMatrix<cols, rows, qreal> matrix;
    To copy to clipboard, switch view to plain text mode 
    But this will not compile because rows/cols are not constant. Is there a way to work around?

    Thanks!

  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: How to use QGenericMatrix for dynamic rows and columns?

    Not using QGenericMatrix class.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. Static/Fixed rows and columns in a QTreeView
    By code_talker in forum Qt Programming
    Replies: 0
    Last Post: 27th April 2011, 13:00
  2. Replies: 1
    Last Post: 12th October 2009, 09:33
  3. QTableWidget: Disable 'snapping' to rows and columns?
    By PolyVox in forum Qt Programming
    Replies: 2
    Last Post: 8th October 2008, 20:04
  4. Replies: 2
    Last Post: 23rd July 2008, 17:48
  5. Replies: 6
    Last Post: 5th March 2006, 21:05

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.