Results 1 to 4 of 4

Thread: Is there a limit to number of widgets on a gui page?

  1. #1
    Join Date
    Apr 2017
    Posts
    43
    Thanks
    6
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Is there a limit to number of widgets on a gui page?

    I made up a demo showing how to change colors and text of various widgets. I have 9 Qdial, 9 QRadioButton, 11 pushbutton on the page.

    When I add one more pushbutton it shows on the designer view but not when running. Also when I associate a pressed() slot with it the compiler complains about it.

    Is there a limit?

    Thanks in advance

  2. #2
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    3,995
    Thanks
    232
    Thanked 631 Times in 621 Posts
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows Android

    Default Re: Is there a limit to number of widgets on a gui page?

    Is there a limit?
    None except the limit imposed by the size of your screen. And if you put them in a scrolling window, then there really isn't a size limit either.

    Also when I associate a pressed() slot with it the compiler complains about it.
    Then you're likely using the wrong variable name in your code. Go back to Qt Designer and see what it thinks it is named and either rename it there and save the file or fix your code to match.
    <=== The Great Pumpkin says ===>
    Please use CODE tags when posting source code so it is more readable. Click "Go Advanced" and then the "#" icon to insert the tags. Paste your code between them.

  3. #3
    Join Date
    Apr 2017
    Posts
    43
    Thanks
    6
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Is there a limit to number of widgets on a gui page?

    The problem is frustrating. I cant add any widgets at all. I'm wondering if something got corrupted. Working in creator I open the .ui file and add a pushbutton or textedit box. It shows up in on the gui. When I compile it does not show up when the app is executed. If I add a slot, the compiler complains that the widget named, no matter what I call it, I get the error 'class Ui::buttonDemo' has no member named widget1.

    What could be wrong, The name is copied out of the object name field of the widget members/methods window on the right side of the creator window, so there's no error in the spelling of the name. No matter what I name it the results are the same.

    Thanks for helping


    Added after 1 34 minutes:


    An interesting chain of events fixed things, but I'm not comfortable with it.

    I went to a command line, did a qmake on the pro file and did a make It built without the errors that creator was giving.

    The widgets were there and slots functioned as expected.

    I went back to creator, did a build/run and it compiled without error and ran fine.

    Could it be that the CLEAN in creator doesn't completely do what it is supposed to do.

    This is unnerving.

    Thanks for your help, if anyone knows of a bug that might cause this please let us know.
    Last edited by emp1953; 18th June 2017 at 04:40.

  4. #4
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    3,995
    Thanks
    232
    Thanked 631 Times in 621 Posts
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows Android

    Default Re: Is there a limit to number of widgets on a gui page?

    Thanks for your help, if anyone knows of a bug that might cause this please let us know.
    I usually use Visual Studio (which has Microsoft project files, not Qt .pro files), but on the few occasions when I use Qt Creator I have observed that you do not need to run qmake unless you've added new GUI files to a project and the Makefiles need to be updated. Making changes to a .ui file doesn't change the set of files in the project, and the build rules -should- take care of it.

    On the other hand, if you do experience unexplained build behavior, re-running qmake is often a good solution. I don't know if it is a bug as such, maybe just an occasional loss of synchronization between all the moving parts.

    ---
    Someone on the admin side of this forum needs to nuke the spammer (akram009) who posted the comment prior to this one. Seems we have more and more of these idiots popping up lately.
    <=== The Great Pumpkin says ===>
    Please use CODE tags when posting source code so it is more readable. Click "Go Advanced" and then the "#" icon to insert the tags. Paste your code between them.

Similar Threads

  1. QPrinter without page number
    By estanisgeyer in forum Qt Programming
    Replies: 4
    Last Post: 15th October 2015, 13:19
  2. Qt 4.7 limit on number of signals?
    By rghosh in forum Qt Programming
    Replies: 2
    Last Post: 9th February 2011, 10:32
  3. Upper limit on number of widgets?
    By jdiewald in forum Qt Programming
    Replies: 1
    Last Post: 29th September 2008, 23:00
  4. Limit number of row/column in QGridLayout
    By EricF in forum Qt Programming
    Replies: 2
    Last Post: 18th October 2007, 19:54
  5. Displaying Page Number on a widget
    By LiCodeX in forum Newbie
    Replies: 1
    Last Post: 23rd August 2007, 08:34

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.