Results 1 to 4 of 4

Thread: A new widget

  1. #1
    Join Date
    Jan 2006
    Posts
    667
    Thanks
    10
    Thanked 80 Times in 74 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default A new widget

    Hi,

    I am planning to make a new general purpose widget which can act like both as a single line editor and a multiline editor. Following are features that i came up with :

    1.By default it is a single line editor but user can make it a multiline edit box like the image below.



    In the image above the user would have specified the start point of the text and the end point of the text. Apart from this, user would have also specified the point the text should start from the next line onwards (This is just a rough idea).

    2. User would be able to cut copy and paste text (Like any other editor).

    Here are a few other images.





    Basically, the widget takes the shape as user edits the text.
    If any of you are using mac, you can find something like this in its addressbook.

    I am not an expert in Qt and therfore have no idea how to go about doing this. Any ideas on how to do this ?

    Thanks a lot

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 975 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: A new widget

    Interesting idea! Maybe QToolTip code will help you? It's a bit similar, but your code will have to handle the editing and custom shape itself.

  3. #3
    Join Date
    Jan 2006
    Location
    Frankfurt
    Posts
    500
    Thanks
    1
    Thanked 52 Times in 52 Posts
    Platforms
    MacOS X Unix/X11

    Default Re: A new widget

    basicaly it is a text edit. It should be no problem to layout text in any shape using Qt4's new textengine called arthur. I have a mac here so I know Adressbook. I think the problem is that Adressbook does not only provide one multiline edit but a few of them. They have a form that looks like a big textedit where you can select text to copy and paste it. Then you can switch to an editmode where you can edit values in a form:
    Attached Images Attached Images

  4. #4
    Join Date
    Jan 2006
    Posts
    667
    Thanks
    10
    Thanked 80 Times in 74 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: A new widget

    Hi,

    Thanks for replying. Can you guys help me do this? I want to write it and give back to the community so that people here will also be able to use it.

    I am not an expert and therefore have little idea of how to go about doing this.

    Thanks a lot

Similar Threads

  1. QDockWidget inside another widget in the center?
    By Antebios in forum Qt Programming
    Replies: 1
    Last Post: 16th February 2010, 07:06
  2. Widget Focus
    By navi1084 in forum Qt Programming
    Replies: 6
    Last Post: 29th September 2008, 10:22
  3. Playbutton functionality
    By uchennaanyanwu in forum Qt Programming
    Replies: 5
    Last Post: 31st July 2008, 22:29
  4. How to Open & Close a Widget ?!!
    By Fatla in forum Qt Programming
    Replies: 6
    Last Post: 13th June 2008, 20:39
  5. Tricky problem with ARGB widget / UpdateLayeredWindow
    By nooky59 in forum Qt Programming
    Replies: 3
    Last Post: 21st February 2008, 10:35

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.