Results 1 to 8 of 8

Thread: Why is QDialog.show() overriding my lineEdit text?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jun 2012
    Posts
    98
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows
    Thanks
    11

    Default Re: Why is QDialog.show() overriding my lineEdit text?

    Actually, until I messed with it a bit (later) and then combined that with your reply I didn't realize it was working like that. It does make sense I guess. I was thinking of any int value as merely a... means to deal with spinning and such more easily and not the... "head honcho" of the information. It made sense to me that the display value would be the real information and that anything that changed it would refer to *it* for accuracy.

    In this case then it IS still OOP (I'm now agreeing with you) because it's not resetting a value, it's... dynamically acquiring it. Had I known that I bet I could've just overridden the double they use to just display with a single decimal digit eh? (If you come back around I'd really like to know actually.)

    I guess this means I'll re-implement this in the real version so it's not working against itself. Thank you for the information!


    p.s. As another question, did you learn all this from the source code or are you just intimately familiar or..? I ask because I was really digging through the source trying to figure out why setVisible was doing this. I got into some code I couldn't hardly recognize (something recursively calling d_func() to it's child members, and documentation on that is little as it seems that's a Qt programmer tool and not something the users should be using [from what I gathered].)

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

    Default Re: Why is QDialog.show() overriding my lineEdit text?

    Quote Originally Posted by tescrin View Post
    Had I known that I bet I could've just overridden the double they use to just display with a single decimal digit eh? (If you come back around I'd really like to know actually.)
    What is displayed is totally controlled by what textFromValue() returns.

    p.s. As another question, did you learn all this from the source code or are you just intimately familiar or..?
    A lot of experience with how Qt works and how Qt developers think and a lot of time spent on reading the source code of Qt and implementing my own widgets (including spinboxes -- have a look at the link in my signature).
    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.


Similar Threads

  1. Clear text of LineEdit
    By stbb24 in forum Qt Programming
    Replies: 7
    Last Post: 12th June 2012, 14:30
  2. how to show a intger value in LineEdit
    By gauravg in forum Qt Programming
    Replies: 2
    Last Post: 28th February 2012, 11:01
  3. Replies: 9
    Last Post: 25th March 2011, 22:22
  4. lineEdit's setSelection - How to show more text?
    By squidge in forum Qt Programming
    Replies: 3
    Last Post: 30th January 2010, 18:22
  5. Get text from dynamic lineedit
    By wirasto in forum Qt Programming
    Replies: 1
    Last Post: 13th January 2010, 19:56

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.