Results 1 to 13 of 13

Thread: Qt + Barcode Reader

  1. #1
    Join Date
    Jan 2006
    Location
    Kerala
    Posts
    371
    Thanks
    76
    Thanked 37 Times in 32 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Qt + Barcode Reader

    Hi Guys,

    Has anyone used Barcode reader with Qt.
    Is there a need for a QExtSerial. or USB interfacing code .
    Could you please point me to some links
    We can't solve problems by using the same kind of thinking we used when we created them

  2. #2
    Join Date
    Jan 2006
    Location
    Athens - Greece
    Posts
    219
    Thanks
    3
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Qt + Barcode Reader

    Quote Originally Posted by sunil.thaha
    Is there a need for a QExtSerial. or USB interfacing code .
    Could you please point me to some links
    Which platform (Win/Linux)? In linux you can take a look at Serial Programming Guide for POSIX Operating Systems. For the usb interface take a look at http://www.linux-usb.org/

  3. #3
    Join Date
    Jan 2006
    Posts
    132
    Thanked 16 Times in 16 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Qt + Barcode Reader

    The easiest is using a barcode scanner which is looped into the keyboard. You can program such scanners to send different prefixey and postfixes, such as for example Ctrl+F11 when a barcode beginns and CR at the end.

    I have used many scanners in previous (non-Qt) applications over years, and for far the most cases a scanner looped into the keyboard is sufficient. There are rare cases however when this has disadvantages.

  4. #4
    Join Date
    Jan 2006
    Location
    Kerala
    Posts
    371
    Thanks
    76
    Thanked 37 Times in 32 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Qt + Barcode Reader

    I am using Linux.

    Quote Originally Posted by seneca
    The easiest is using a barcode scanner which is looped into the keyboard. You can program such scanners to send different prefixey and postfixes, such as for example Ctrl+F11 when a barcode beginns and CR at the end.
    Could u please elaborate

    using a barcode scanner which is looped into the keyboard
    What does that mean ?
    We can't solve problems by using the same kind of thinking we used when we created them

  5. #5
    Join Date
    Jan 2006
    Posts
    21
    Thanks
    1
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Qt + Barcode Reader

    "looped into the keyboard" - it's something like that: Keyboard->Scanner->Computer. That way you plug your keyboard into scanner and scanner plug in yours computer's keyboard interface. When scanner reads data it sends it like it was inputed via regular keyboard. Scanners I've tried use special barcodes (in their's documentation) for tuning theirs' params.

    If you want to use serial-bus scanner, there is some points:
    1. Due Linux architecture only root can read/write IO ports directly. But using program with root privileges is potentialy dangerous.
    2. If you can get to scanner via /dev/ filesystem - you've got simple solution.
    3. You can write/get little driver or daemon and somehow communicate with your prog.
    4. Somehow - standard unix techniques: pipes, shared memory, TCP/IP sockets (scaneer-application via network ), /proc/ filesistem, /dev/ filesystem etc.
    5. I think there are a lot of other ways...

  6. #6

    Default Re: Qt + Barcode Reader

    I have experience with Barcode reader and I must say that the barcode reader itself has nothing to do with Qt. Actually you should handle the events the barcode sends..the bardcode behaives just like the keyboard. So if u have QLineEdit object and put the focus in it, then plug the barcode in the computer and read some barcode, the code will be written in the QLineEdit object...then tell the LineEdit textChanged(const QString&) method what SLOT() to connect with...

    Simple easy and cool

    P.S.
    The Barcode Reader is not OS depended, it should work even in the BIOS system...

  7. #7
    Join Date
    Jan 2006
    Location
    Kerala
    Posts
    371
    Thanks
    76
    Thanked 37 Times in 32 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Qt + Barcode Reader

    Quote Originally Posted by dec0ding
    I have experience with Barcode reader and I must say that the barcode reader itself has nothing to do with Qt. Actually you should handle the events the barcode sends..the bardcode behaives just like the keyboard. So if u have QLineEdit object and put the focus in it, then plug the barcode in the computer and read some barcode, the code will be written in the QLineEdit object...then tell the LineEdit textChanged(const QString&) method what SLOT() to connect with...

    Simple easy and cool

    P.S.
    The Barcode Reader is not OS depended, it should work even in the BIOS system...
    If this is the case We need not worry about such a thing called the Barcode Reader Do we ?
    We can't solve problems by using the same kind of thinking we used when we created them

  8. #8
    Join Date
    Jan 2006
    Posts
    21
    Thanks
    1
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Qt + Barcode Reader

    Quote Originally Posted by sunil.thaha
    If this is the case We need not worry about such a thing called the Barcode Reader Do we ?
    Generally yes. If you have "looped into the keyboard" you don't have to worry about it at all. Though tuning of barcode reader itself may be needed (things like type of code etc).

  9. #9

    Default Re: Qt + Barcode Reader

    Quote Originally Posted by sunil.thaha
    If this is the case We need not worry about such a thing called the Barcode Reader Do we ?
    sure, just as you dont have to look after Keybords stdin...Barcode reader writes in the Stdin...so the system reads it.

    That is all. But there might be different types of Barcode readers anyways...I have experience with one type. Just ask for one that will connect with the keyboard and then both devices will go into PS/2 or serial...

  10. #10
    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: Qt + Barcode Reader

    Is this topic related to Qt in any way? Moving to "General Discussion".

  11. #11
    Join Date
    Jan 2006
    Location
    Kerala
    Posts
    371
    Thanks
    76
    Thanked 37 Times in 32 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Qt + Barcode Reader

    Quote Originally Posted by wysota
    Is this topic related to Qt in any way? Moving to "General Discussion".
    Me too I didn't want to post here. I mistook Qt's General for General Discussion
    We can't solve problems by using the same kind of thinking we used when we created them

  12. #12
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Qt + Barcode Reader

    Bar code scanner is just a device.
    So first you need to know what kind of a device you have.
    If its serial, then you can use QExtSerial.
    If its parallel, you can use parapin, and I made a Qt wrapper class for it you want I can send it to you.
    I don't know my self about any USB C++ or Qt wrappers, so either you will have to seach for it, or write it your self.
    (I am talking about linux here)

    Again, Qt is a GUI tool kit, and if your app needs to talk to any hardware, you will have to link agains that hardware driver, but it has nothing to do with the application being builed with Qt.
    Some times it can be convinent to wrap API of drivers with Qt, and enjoy signal and slots to communicate with the hardware.
    I have done it with frame grabbers, parapin, and also custom made (not by me) USB driver.

  13. #13
    Join Date
    Nov 2007
    Posts
    27
    Thanks
    5
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: Qt + Barcode Reader

    Quote Originally Posted by theLSB View Post
    B
    If its parallel, you can use parapin, and I made a Qt wrapper class for it you want I can send it to you..

    I want to access the parapin-kernel-driver (from user-space) in a KDE-QT application.
    May you send me the code you are speaking about above, please.

    cheers wally
    Last edited by wallyqt; 13th November 2007 at 13:15. Reason: changed notification mode

Similar Threads

  1. Replies: 4
    Last Post: 27th June 2012, 11:41
  2. how make barcode in Qt 4 Win 32 ?
    By agoestafin in forum Qt Programming
    Replies: 2
    Last Post: 30th January 2009, 08:32
  3. reseting reader
    By uchennaanyanwu in forum Newbie
    Replies: 1
    Last Post: 1st August 2008, 21:28

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.