Results 1 to 2 of 2

Thread: Design of spreadsheet

  1. #1
    Join Date
    Nov 2009
    Posts
    1
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Design of spreadsheet

    Hi,

    I am an absolute Newbie to Qt just trying to understand the best approach to a problem I am working on:

    I need to build a "spreadsheet" style of application that has a very specific presentation and as such it is not possible to use a pre-built spreadsheet widget. I decided to start my work by sub classing QLineEdit as a "Cell" class, add appropriate functionality and then combine cells into rows.

    The first issue I discovered was that although I could set the text of a QLineEdit object in the Cell class constructor, the only way I could change the text later on was to use a signal: setText() - using, this->setText("Hello") seems to load the text (as it can be read back) but it does not display.

    Also, I have noted after looking at other spreadsheet code that another approach may be to use a label widget as the cell basis and then create a QLineEdit widget whenever the cell is edited - not sure of the advantage of this?

    I guess that these are fairly basis questions - nevertheless andy assiastance would be appreciated...

    Mark

  2. #2
    Join Date
    Oct 2009
    Posts
    151
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    6
    Thanked 13 Times in 11 Posts

    Default Re: Design of spreadsheet

    I believe that you need to use the displayText() function to actually see the text.

    Incidentally have you seen the official book C++ GUI Programming with Qt 4?

    There is an online version of it on the Nokia website http://qt.nokia.com/developer/getting-started

    You may be interested in chapters 3 & 4 where QT features are demonstrated by building a spreadsheet.

Similar Threads

  1. Using QTextDocumentWriter to write a spreadsheet in ODF
    By DrDonut in forum Qt Programming
    Replies: 4
    Last Post: 18th October 2009, 14:27
  2. C++/QT Design
    By xmeister in forum Newbie
    Replies: 6
    Last Post: 2nd April 2009, 03:39
  3. Replies: 3
    Last Post: 6th October 2008, 00:41
  4. Need some help on design and implementation
    By cool_qt in forum Qt Programming
    Replies: 2
    Last Post: 30th July 2008, 22:19
  5. Dialog and code design issue
    By Gopala Krishna in forum Qt Programming
    Replies: 1
    Last Post: 24th September 2006, 18:54

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.