Results 1 to 4 of 4

Thread: QComboBox and QValidator

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Sep 2010
    Location
    Norway
    Posts
    12
    Thanks
    1
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QComboBox and QValidator

    Yes I wanted to complain. However, it was suppose to be a question too: Is there a way of setting a qvalidator to the qcombobox and retreving it when the qcombobox is not editable?

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QComboBox and QValidator

    Quote Originally Posted by mrandreas View Post
    Yes I wanted to complain. However, it was suppose to be a question too: Is there a way of setting a qvalidator to the qcombobox and retreving it when the qcombobox is not editable?
    If it is just about attaching one object to another then you can make the validator a child of the combobox and then query the combobox for its children inheriting QValidator interface (using QObject::findChild).
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. The following user says thank you to wysota for this useful post:

    mrandreas (28th September 2010)

Similar Threads

  1. QValidator problem
    By zgulser in forum Qt Programming
    Replies: 2
    Last Post: 19th October 2011, 04:24
  2. Can't compile custom QValidator
    By vieraci in forum Qt Programming
    Replies: 1
    Last Post: 22nd August 2009, 15:12
  3. QValidator and ListWidget
    By csvivek in forum Qt Programming
    Replies: 4
    Last Post: 9th July 2008, 19:19
  4. QValidator for QGraphicsTextItem
    By arjunasd in forum Qt Programming
    Replies: 4
    Last Post: 8th August 2007, 15:34
  5. QLineEdit & QValidator - umm...
    By matheww in forum Qt Programming
    Replies: 3
    Last Post: 20th June 2007, 21:40

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
  •  
Qt is a trademark of The Qt Company.