Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. International
  3. India
  4. How to delete widgets from Qvboxlayout

How to delete widgets from Qvboxlayout

Scheduled Pinned Locked Moved India
1 Posts 1 Posters 967 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    saravanavelu39
    wrote on last edited by
    #1

    Hi friends,

              i am facing the one issue,,how to delete all widget from qvboxlayout in Qt,,After deleteing the widget i need to add some widget in the same Qvboxlayout,,now i delete the widget from Qvboxlayout,,and after that i add the new widget means Qvboxlayout take more spaces between the two widgets,, In below i added the code for deleting the widget from layout
    

    @QLayoutItem* item;
    while ( ( item = rightui->listLayout->takeAt( 0 ) ) != NULL )
    {
    if (item->widget()) {
    qDebug() << "item widget: " << item->widget();
    delete item->widget();
    }
    delete item;
    }@
    Please Give me a good solution for this,,,Thanks

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved