Results 1 to 4 of 4

Thread: The way to insert pattern

  1. #1
    Join Date
    Apr 2010
    Posts
    3
    Qt products
    Qt4
    Platforms
    Windows

    Default The way to insert pattern

    I have a little problem. I'm writing a program to drawing mathematical lineal functions. It's easy. I can do lineEdits to insert parameters a,b,c. But it's not satisfy me. I want to do sth better. Not only program to read from general form of pattern.
    And in this point is the problem. I want to convert pattern which I write in listEdit.
    Can you help me? Do you have some idea?

  2. #2
    Join Date
    Oct 2006
    Location
    New Delhi, India
    Posts
    2,467
    Thanks
    8
    Thanked 334 Times in 317 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: The way to insert pattern

    What do you mean by pattern ?
    and can u explain with an example ?

  3. #3
    Join Date
    Apr 2010
    Posts
    3
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: The way to insert pattern

    In lineEdit I want to insert for example
    -|(x+1)^2+3|-2
    and I want to program draw it.

  4. #4
    Join Date
    Feb 2007
    Location
    Karlsruhe, Germany
    Posts
    469
    Thanks
    17
    Thanked 90 Times in 88 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: The way to insert pattern

    You will need a math expression parser for that. I cannot recommend writing one yourself, unless you can restrict the number of operators/functions or you have a lot of time at your disposal.

    Quick search: http://www.codeproject.com/KB/recipe...athParser.aspx

    Another approach would be to do this with qtscript. The syntax would be different, but the user could easily define his own functions etc..

    HIH

    Johannes

Similar Threads

  1. Is there a web search pattern?
    By thewooferbbk in forum Qt Programming
    Replies: 1
    Last Post: 18th October 2009, 16:02
  2. GIS design pattern
    By olosie in forum Qt Programming
    Replies: 2
    Last Post: 19th May 2009, 16:19
  3. pattern
    By mickey in forum General Discussion
    Replies: 3
    Last Post: 14th February 2009, 17:12
  4. Qt, Databases & the DAO Pattern
    By Paul Drummond in forum Qt Programming
    Replies: 1
    Last Post: 22nd February 2006, 16:13
  5. trying to use singleton pattern
    By therealjag in forum Newbie
    Replies: 3
    Last Post: 20th February 2006, 01:20

Tags for this Thread

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.