Results 1 to 3 of 3

Thread: Unable to get my spinbox to display (all that shows is the associated label)

  1. #1
    Join Date
    May 2012
    Posts
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default Unable to get my spinbox to display (all that shows is the associated label)

    My spinbox (class QSpinBox) does not display - I've tried the "show" method and I've made sure that the spinbox is enabled. Yet, all that ever displays is the QLabel text field object associated with the spinbox.
    I am a complete newbie to Qt, so it may very well be something simple that I am not doing....or maybe it's a need for an entire set of complex steps that is needed to display this widget.
    If anybody can help me it is greatly appreciated. THANK YOU

    Brian S.

  2. #2
    Join Date
    May 2011
    Posts
    239
    Thanks
    4
    Thanked 35 Times in 35 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Symbian S60

    Default Re: Unable to get my spinbox to display (all that shows is the associated label)

    I wonder what you mean by "associating" the spinbox with a QLabel. If that means that you have set a QLabel as a parent of the QSpinBox thinking that it would adjust the QLabel. I doesn't. It has its own edit field. If that is so, I wouldn't be surprised that it is not shown. Treat it as any other component in the container (QWidget or layout or whatever) and set its parent appropriately or leave it to NULL and I would think that it will show just fine.

  3. #3
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: Unable to get my spinbox to display (all that shows is the associated label)

    Quote Originally Posted by bschumacher View Post
    If anybody can help me it is greatly appreciated.
    You would do a lot to help yourself by showing us what you have done. There are about a jillion ways your code could be broken.

Similar Threads

  1. Replies: 15
    Last Post: 31st January 2020, 18:25
  2. Qt Designer How to make Button work with webwiev and a Label shows Mouse Position?
    By heavy.is.happy in forum Qt Tools
    Replies: 3
    Last Post: 8th July 2011, 19:26
  3. display number on label
    By aj2903 in forum Qt Programming
    Replies: 4
    Last Post: 12th March 2009, 07:24
  4. unable to hide combobox or spinbox in toolbar
    By Sandip in forum Qt Programming
    Replies: 1
    Last Post: 22nd July 2008, 11:52
  5. Display a Label on top of a QGlWidget
    By Lele in forum Qt Programming
    Replies: 3
    Last Post: 4th February 2008, 16:11

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.