Results 1 to 2 of 2

Thread: custom a display widget that can take input from touch panel

  1. #1
    Join Date
    Feb 2008
    Thanked 4 Times in 1 Post

    Default custom a display widget that can take input from touch panel

    Hello, guys..

    I have a job that need to implement a display widget who can take input from the touch panel.

    the widget is used for displaying the content of QDateTime, or something else, I prefer use the QLabel class, which has the feature of "alignment", "font", "word wrap", "text format". but QLabel can not take input, like "clicked" event, because i would use "click" to show a window(set time dialog, etc).

    Maybe i should use QPushButton or QAbstractButton to start, but really, I don't want to lose the power features provided by QLabel。

    Exactly, I want both QPushButton and QLabel, a widget display things like QLabel, and responed events like QPushButton. ~_~ ...

    what is the best way to go ?

    tks ..

    Last edited by wesley; 25th January 2010 at 04:44.

  2. #2
    Join Date
    Oct 2006
    New Delhi, India
    Thanked 334 Times in 317 Posts
    Qt products
    Unix/X11 Windows

    Default Re: custom a display widget that can take input from touch panel

    You can overide the mouseevents of QLabel and interpret clicked() as you want.
    Other way is to use QPushButton and set its style to flat(in case you dont have very stylish font or word wrapping).

Similar Threads

  1. how can I input and display Chinese using QT4?
    By Justin_W in forum Qt for Embedded and Mobile
    Replies: 0
    Last Post: 12th August 2008, 18:46
  2. Replies: 3
    Last Post: 26th November 2007, 19:01
  3. regarding input widget
    By jagadish in forum Qt Tools
    Replies: 1
    Last Post: 28th June 2007, 13:07
  4. Replies: 5
    Last Post: 16th May 2006, 21:38
  5. Replies: 3
    Last Post: 12th April 2006, 09:20


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.