Results 1 to 20 of 27

Thread: How do I obtain mouse hover/popup functionality in a Qtableview?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    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: How do I obtain mouse hover/popup functionality in a Qtableview?

    Quote Originally Posted by georgep View Post
    it might be simple, but I dont understand how to get the spinbox delegate in the datetime column of the database (and not in others)[see pic]. I searched for the code in
    src\sql\models\qsqltablemodel.cpp but couldnt manage to find anything...
    Because it's nothing related to the model. You need to provide your own delegate - subclass one of the existing classes and reimplement QAbstractItemDelegate::createEditor() to return a spinbox for the appropriate column or datatype.


    Because im very new to Qt, and not very experienced in cpp either so there is a significant chance i would write something stupid.
    So please restrain yourself from such statements. It's either writing examples at the wiki or answering questions here. The time and will of people willing to help is limited -- don't reduce their motivation even more, please.
    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.


  2. #2
    Join Date
    Oct 2008
    Location
    Europe
    Posts
    37
    Thanks
    3
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Lightbulb Re: How do I obtain mouse hover/popup functionality in a Qtableview?

    Quote Originally Posted by wysota View Post
    So please restrain yourself from such statements. It's either writing examples at the wiki or answering questions here. The time and will of people willing to help is limited -- don't reduce their motivation even more, please.
    Thanks for the suggestion, i will reimplement a delegate class.

    What statements ??? I think you might have misunderstood me (my fault probably), I was merely speaking about miself, and i never commanded anyone anything...

    cheers

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.