Results 1 to 5 of 5

Thread: tab e qwidget

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Posts
    976
    Thanks
    53
    Qt products
    Qt3
    Platforms
    Windows

    Default tab e qwidget

    Hi, I have a tabwidget; inside it some spinbox; I enable it, set spinbox values, and sometimes I need to disable it; is there a simple way to clear to '0' the spinbox values when I disable tab? (no spinbox->setvalue(0)
    Regards

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

    Default Re: tab e qwidget

    What's wrong with setValue(0)?

  3. #3
    Join Date
    Jan 2006
    Posts
    976
    Thanks
    53
    Qt products
    Qt3
    Platforms
    Windows

    Default Re: tab e qwidget

    nothing; it's the same problem; I must do 3 setValue for time (and code this for 8 tabs) (I hoped in a QT trick)
    Regards

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

    Default Re: tab e qwidget

    "Qt trick" would involve calling some method for every spinbox, so this wouldn't change anything. You can implement a method which will call setValue(0) for every spinbox in the group and just call this method when you want to clear all the boxes. Again, it won't change anything...

  5. #5
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: tab e qwidget

    Quote Originally Posted by mickey
    I must do 3 setValue for time (and code this for 8 tabs)
    If you would subclass the tab and make it do what you want, you would have to write it only once.

Similar Threads

  1. Replies: 1
    Last Post: 2nd May 2006, 21:11
  2. size issues for custom QWidget in QScrollArea
    By anotheruser in forum Qt Programming
    Replies: 1
    Last Post: 27th April 2006, 14:52
  3. moving QWidget and Mainform
    By mickey in forum Newbie
    Replies: 9
    Last Post: 6th April 2006, 17:54
  4. QWidget
    By mickey in forum Newbie
    Replies: 5
    Last Post: 4th April 2006, 22:06
  5. QScrollArea problem positioning a QWidget inside
    By Spectator in forum Qt Programming
    Replies: 4
    Last Post: 20th February 2006, 22:59

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.