Results 1 to 15 of 15

Thread: Issue with visuals when updating QGridLayout inside QScrollArea

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jun 2011
    Location
    Finland
    Posts
    164
    Thanks
    1
    Thanked 26 Times in 26 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Maemo/MeeGo

    Default Re: Issue with visuals when updating QGridLayout inside QScrollArea

    I tried to play with Icons, I couldn't get any visual problem. How is your TabButton implemented?

  2. #2
    Join Date
    Jun 2011
    Posts
    8
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Issue with visuals when updating QGridLayout inside QScrollArea

    Hi. In the attached zip, you will find 4 files.
    Please note that this tab layout, in case I have not already explained, is used in a web browser application.
    tabs.cpp and tabs.h
    This includes the following classes:
    TabPreviewer - A QLabel designed to display a QPixmap(The website rendered and resized), as well as the website title.
    TabButton - The QPushButton that is the base tab
    TabMenu - This can be ignored. It is a QListWidget that is designed to essentially show a list of all the tabs upon a button being clicked.
    TabBar - This is where most of the guts occurs. It is the QWidget containing all the visual stuff.
    Tabs - This is the QStackedWidget. Each widget in here is a "Tab" object, and inside that "Tab" object is a QWebView(well, a derived version of QWebView [BrowserView]). The only reason you should need to look through this is if you want to see how variables in TabBar/TabButton interact with it.

    And then there is tab.cpp and tab.h:
    This is just the Tab class. A Tab is a QWidget containing a BrowserView[derived from QWebView].

    At some point soon, I will more than likely seperate each class in to it's own file.

    I apologize for the messiness of my code. If there is something you can not understand or have questions about, feel free to ask me.

    I thought it would be best to send you this instead of going back and forth between everything, as the problem may or may not be in something I have not talked about much yet.

    Thanks a lot for your help, it is really appreciated.



    UPDATE: Issue is fixed. Someone on IRC told me that removeAt/removeWidget just removes the item from the list/layout - it doesn't delete the item. In the TabBar::removeAt method, I remove the TabButton, and then (I didn't do this before) I delete the actual TabButton object. This seems to solve all my problems.
    Thanks a lot to everyone who helped.
    Attached Files Attached Files
    Last edited by TimeBomb; 18th June 2011 at 10:23.

  3. #3
    Join Date
    Jun 2011
    Location
    Finland
    Posts
    164
    Thanks
    1
    Thanked 26 Times in 26 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Maemo/MeeGo

    Default Re: Issue with visuals when updating QGridLayout inside QScrollArea

    I was just going to write that...

  4. #4
    Join Date
    Jun 2011
    Posts
    8
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Issue with visuals when updating QGridLayout inside QScrollArea

    Quote Originally Posted by Rachol View Post
    I was just going to write that...
    Hehe. Nonetheless, thanks a lot for baring with me, I appreciate the help.
    This issue was blocking the release of the next alpha version of my app, so I am glad it is fixed.

Similar Threads

  1. getting to the buttons inside a QGridLayout
    By mr_kazoodle in forum Newbie
    Replies: 2
    Last Post: 19th February 2011, 16:48
  2. Replies: 2
    Last Post: 29th October 2010, 09:44
  3. Resizing QGraphicsView inside a QGridLayout
    By mckinnon in forum Newbie
    Replies: 3
    Last Post: 9th September 2010, 10:15
  4. QGridLayout issue
    By talk2amulya in forum Qt Programming
    Replies: 3
    Last Post: 2nd January 2010, 18:32
  5. Problem with QScrollArea updating from 4.0.1 to 4.1.0
    By SkripT in forum Qt Programming
    Replies: 8
    Last Post: 28th January 2006, 22:35

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.