KL
Konstantin LazarevMay 2, 2017, 5:15 a.m.

Изменение размера QGridLayout

Необходимо при нажатии на кнопку, которая находится под QWebView изменить размеры выбранного окна. Ниже приведен скрин приложения.

Screenshot_1.jpg
We recommend hosting TIMEWEB
We recommend hosting TIMEWEB
Stable hosting, on which the social network EVILEG is located. For projects on Django we recommend VDS hosting.

Do you like it? Share on social networks!

8
KL
  • May 2, 2017, 5:17 a.m.
#include "checkurl.h"
#include "ui_checkurl.h"
#include <QWebView>
#include <QUrl>
#include <QGridLayout>
#include <QPushButton>

CheckUrl::CheckUrl(QWidget *parent) :
    QDialog(parent),
    ui(new Ui::CheckUrl)
{
    ui->setupUi(this);

    QGridLayout *layout =new QGridLayout;
    QWebView *view=new QWebView;
    setStyleSheet("QWebView {border: 2px solid red}");
    QWebView *view1=new QWebView;
    QWebView *view2=new QWebView;
    QWebView *view3=new QWebView;
    QWebView *view4=new QWebView;
    QWebView *view5=new QWebView;
    QWebView *view6=new QWebView;
    QWebView *view7=new QWebView;
    QWebView *view8=new QWebView;
    QWebView *view9=new QWebView;
    QWebView *view10=new QWebView;
    QWebView *view11=new QWebView;
    QWebView *view12=new QWebView;
    QWebView *view13=new QWebView;
    QWebView *view14=new QWebView;
    QWebView *view15=new QWebView;
    QPushButton *button=new QPushButton("Show");
    QPushButton *button1=new QPushButton("Show");
    QPushButton *button2=new QPushButton("Show");
    QPushButton *button3=new QPushButton("Show");
    QPushButton *button4=new QPushButton("Show");
    QPushButton *button5=new QPushButton("Show");
    QPushButton *button6=new QPushButton("Show");
    QPushButton *button7=new QPushButton("Show");
    QPushButton *button8=new QPushButton("Show");
    QPushButton *button9=new QPushButton("Show");
    QPushButton *button10=new QPushButton("Show");
    QPushButton *button11=new QPushButton("Show");
    QPushButton *button12=new QPushButton("Show");
    QPushButton *button13=new QPushButton("Show");
    QPushButton *button14=new QPushButton("Show");
    QPushButton *button15=new QPushButton("Show");
    QPushButton *button16=new QPushButton("New Page");
    QPushButton *button17=new QPushButton("Close");

    view->load(QUrl("http://gazetax.ru/zarabotok-na-textah.php"));
    view1->load(QUrl("http://gazetax.ru/zarabotok-na-textah.php"));
    view2->load(QUrl("http://gazetax.ru/zarabotok-na-textah.php"));
    view3->load(QUrl("http://gazetax.ru/zarabotok-na-textah.php"));
    view4->load(QUrl("http://gazetax.ru/zarabotok-na-textah.php"));
    view5->load(QUrl("http://gazetax.ru/zarabotok-na-textah.php"));
    view6->load(QUrl("http://gazetax.ru/zarabotok-na-textah.php"));
    view7->load(QUrl("http://gazetax.ru/zarabotok-na-textah.php"));
    view8->load(QUrl("http://gazetax.ru/zarabotok-na-textah.php"));
    view9->load(QUrl("http://gazetax.ru/zarabotok-na-textah.php"));
    view10->load(QUrl("http://gazetax.ru/zarabotok-na-textah.php"));
    view11->load(QUrl("http://gazetax.ru/zarabotok-na-textah.php"));
    view12->load(QUrl("http://gazetax.ru/zarabotok-na-textah.php"));
    view13->load(QUrl("http://gazetax.ru/zarabotok-na-textah.php"));
    view14->load(QUrl("http://gazetax.ru/zarabotok-na-textah.php"));
    view15->load(QUrl("http://gazetax.ru/zarabotok-na-textah.php"));

   layout->addWidget(view,0,0);
   layout->addWidget(view1,0,1);
   layout->addWidget(view2,0,2);
   layout->addWidget(view3,0,3);
   layout->addWidget(button,1,0);
   layout->addWidget(button1,1,1);
   layout->addWidget(button2,1,2);
  layout->addWidget(button3,1,3);
  layout->addWidget(view4,2,0);
  layout->addWidget(view5,2,1);
  layout->addWidget(view6,2,2);
  layout->addWidget(view7,2,3);
  layout->addWidget(button4,3,0);
  layout->addWidget(button5,3,1);
  layout->addWidget(button6,3,2);
 layout->addWidget(button7,3,3);
 layout->addWidget(view8,4,0);
 layout->addWidget(view9,4,1);
 layout->addWidget(view10,4,2);
 layout->addWidget(view11,4,3);
 layout->addWidget(button8,5,0);
 layout->addWidget(button9,5,1);
 layout->addWidget(button10,5,2);
 layout->addWidget(button11,5,3);
 layout->addWidget(view12,6,0);
 layout->addWidget(view13,6,1);
 layout->addWidget(view14,6,2);
 layout->addWidget(view15,6,3);
 layout->addWidget(button12,7,0);
 layout->addWidget(button13,7,1);
 layout->addWidget(button14,7,2);
layout->addWidget(button15,7,3);
layout->addWidget(button16,8,2);
layout->addWidget(button17,8,3);



   //layout->addWidget(button,3,0);
   this->setLayout(layout);

connect(button17, SIGNAL(clicked()),this,SLOT(close()));

}

CheckUrl::~CheckUrl()
{
    delete ui;
}


    KL
    • May 2, 2017, 10 a.m.
    • The answer was marked as a solution.
    #include "checkurl.h"
    #include "ui_checkurl.h"
    #include <QWebView>
    #include <QUrl>
    #include <QGridLayout>
    #include <QPushButton>
    #include <mybutton.h>
    
    CheckUrl::CheckUrl(QWidget *parent) :
        QDialog(parent),
        ui(new Ui::CheckUrl)
    {
        ui->setupUi(this);
    
        layout =new QGridLayout;
        view=new QWebView;
        setStyleSheet("QWebView {border: 1px solid red} QPushButton{background: white; color: red}");
        view1=new QWebView;
        view2=new QWebView;
        view3=new QWebView;
        view4=new QWebView;
        view5=new QWebView;
        view6=new QWebView;
        view7=new QWebView;
        view8=new QWebView;
        view9=new QWebView;
        view10=new QWebView;
        view11=new QWebView;
        view12=new QWebView;
        view13=new QWebView;
        view14=new QWebView;
        view15=new QWebView;
        button=new MyButton;
        button1=new MyButton;
        button2=new MyButton;
        button3=new MyButton;
        button4=new MyButton;
        button5=new MyButton;
        button6=new MyButton;
        button7=new MyButton;
        button8=new MyButton;
        button9=new MyButton;
        button10=new MyButton;
        button11=new MyButton;
        button12=new MyButton;
        button13=new MyButton;
        button14=new MyButton;
        button15=new MyButton;
        button16=new MyButton;
        button17=new MyButton;
        button->setText("Show");
        button1->setText("Show");
        button2->setText("Show");
        button3->setText("Show");
        button4->setText("Show");
        button5->setText("Show");
        button6->setText("Show");
        button7->setText("Show");
        button8->setText("Show");
        button9->setText("Show");
        button10->setText("Show");
        button11->setText("Show");
        button12->setText("Show");
        button13->setText("Show");
        button14->setText("Show");
        button15->setText("Show");
        button16->setText("New Page");
        button17->setText("Close");
        button->setId(0);
        button1->setId(1);
        button2->setId(2);
        button3->setId(3);
        button4->setId(4);
        button5->setId(5);
        button6->setId(6);
        button7->setId(7);
        button8->setId(8);
        button9->setId(9);
        button10->setId(10);
        button11->setId(11);
        button12->setId(12);
        button13->setId(13);
        button14->setId(14);
        button15->setId(15);
    
        view->load(QUrl("http://gazetax.ru/zarabotok-na-textah.php"));
        view1->load(QUrl("http://gazetax.ru/comment.php"));
        view2->load(QUrl("http://gazetax.ru/"));
        view3->load(QUrl("http://gazetax.ru/zarabotok-na-textah.php"));
        view4->load(QUrl("http://gazetax.ru/zarabotok-na-textah.php"));
        view5->load(QUrl("http://gazetax.ru/zarabotok-na-textah.php"));
        view6->load(QUrl("http://gazetax.ru/zarabotok-na-textah.php"));
        view7->load(QUrl("http://gazetax.ru/zarabotok-na-textah.php"));
        view8->load(QUrl("http://gazetax.ru/zarabotok-na-textah.php"));
        view9->load(QUrl("http://gazetax.ru/zarabotok-na-textah.php"));
        view10->load(QUrl("http://gazetax.ru/zarabotok-na-textah.php"));
        view11->load(QUrl("http://gazetax.ru/zarabotok-na-textah.php"));
        view12->load(QUrl("http://gazetax.ru/zarabotok-na-textah.php"));
        view13->load(QUrl("http://gazetax.ru/zarabotok-na-textah.php"));
        view14->load(QUrl("http://gazetax.ru/zarabotok-na-textah.php"));
        view15->load(QUrl("http://gazetax.ru/zarabotok-na-textah.php"));
    
       layout->addWidget(view,0,0);
       layout->addWidget(view1,0,1);
       layout->addWidget(view2,0,2);
       layout->addWidget(view3,0,3);
       layout->addWidget(button,1,0);
       layout->addWidget(button1,1,1);
       layout->addWidget(button2,1,2);
      layout->addWidget(button3,1,3);
      layout->addWidget(view4,2,0);
      layout->addWidget(view5,2,1);
      layout->addWidget(view6,2,2);
      layout->addWidget(view7,2,3);
      layout->addWidget(button4,3,0);
      layout->addWidget(button5,3,1);
      layout->addWidget(button6,3,2);
     layout->addWidget(button7,3,3);
     layout->addWidget(view8,4,0);
     layout->addWidget(view9,4,1);
     layout->addWidget(view10,4,2);
     layout->addWidget(view11,4,3);
     layout->addWidget(button8,5,0);
     layout->addWidget(button9,5,1);
     layout->addWidget(button10,5,2);
     layout->addWidget(button11,5,3);
     layout->addWidget(view12,6,0);
     layout->addWidget(view13,6,1);
     layout->addWidget(view14,6,2);
     layout->addWidget(view15,6,3);
     layout->addWidget(button12,7,0);
     layout->addWidget(button13,7,1);
     layout->addWidget(button14,7,2);
    layout->addWidget(button15,7,3);
    layout->addWidget(button16,8,2);
    layout->addWidget(button17,8,3);
    
    
    count=0;
       //layout->addWidget(button,3,0);
       this->setLayout(layout);
    
    connect(button17, SIGNAL(clicked()),this,SLOT(close()));
    connect(button, SIGNAL(clicked()),this,SLOT(ShowFull()));
    connect(button1, SIGNAL(clicked()),this,SLOT(ShowFull()));
    connect(button2, SIGNAL(clicked()),this,SLOT(ShowFull()));
    connect(button3, SIGNAL(clicked()),this,SLOT(ShowFull()));
    connect(button4, SIGNAL(clicked()),this,SLOT(ShowFull()));
    connect(button5, SIGNAL(clicked()),this,SLOT(ShowFull()));
    connect(button6, SIGNAL(clicked()),this,SLOT(ShowFull()));
    connect(button7, SIGNAL(clicked()),this,SLOT(ShowFull()));
    connect(button8, SIGNAL(clicked()),this,SLOT(ShowFull()));
    connect(button9, SIGNAL(clicked()),this,SLOT(ShowFull()));
    connect(button10, SIGNAL(clicked()),this,SLOT(ShowFull()));
    connect(button11, SIGNAL(clicked()),this,SLOT(ShowFull()));
    connect(button12, SIGNAL(clicked()),this,SLOT(ShowFull()));
    connect(button13, SIGNAL(clicked()),this,SLOT(ShowFull()));
    connect(button14, SIGNAL(clicked()),this,SLOT(ShowFull()));
    connect(button15, SIGNAL(clicked()),this,SLOT(ShowFull()));
    
    }
    
    CheckUrl::~CheckUrl()
    {
        delete ui;
    }
    
    void CheckUrl::ShowFull()
    {
    
        if(count==0)
        {
        QObject* obj=QObject::sender();
        MyButton *tb=qobject_cast<MyButton *>(obj);
        qDebug()<<tb->getId();
        if(tb->getId()==0)
        {
    layout->addWidget(view, 0, 0, 0, 4);
    button->setText("Back");
    layout->addWidget(button, 8,1);
    view1->hide();
    button1->hide();
    view2->hide();
    button2->hide();
    view3->hide();
    button3->hide();
    view4->hide();
    button4->hide();
    view5->hide();
    button5->hide();
    view6->hide();
    button6->hide();
    view7->hide();
    button7->hide();
    view8->hide();
    button8->hide();
    view9->hide();
    button9->hide();
    view10->hide();
    button10->hide();
    view11->hide();
    button11->hide();
    view12->hide();
    button12->hide();
    view13->hide();
    button13->hide();
    view14->hide();
    button14->hide();
    view15->hide();
    button15->hide();
        }
         if(tb->getId()==1)
         {
             layout->addWidget(view1, 0, 0, 0, 4);
             button1->setText("Back");
             layout->addWidget(button1, 8,1);
             view->hide();
             button->hide();
             view2->hide();
             button2->hide();
             view3->hide();
             button3->hide();
             view4->hide();
             button4->hide();
             view5->hide();
             button5->hide();
             view6->hide();
             button6->hide();
             view7->hide();
             button7->hide();
             view8->hide();
             button8->hide();
             view9->hide();
             button9->hide();
             view10->hide();
             button10->hide();
             view11->hide();
             button11->hide();
             view12->hide();
             button12->hide();
             view13->hide();
             button13->hide();
             view14->hide();
             button14->hide();
             view15->hide();
             button15->hide();
         }
         if(tb->getId()==2)
         {
             layout->addWidget(view2, 0, 0, 0, 4);
             button2->setText("Back");
             layout->addWidget(button2, 8,1);
             view->hide();
             button->hide();
             view1->hide();
             button1->hide();
             view3->hide();
             button3->hide();
             view4->hide();
             button4->hide();
             view5->hide();
             button5->hide();
             view6->hide();
             button6->hide();
             view7->hide();
             button7->hide();
             view8->hide();
             button8->hide();
             view9->hide();
             button9->hide();
             view10->hide();
             button10->hide();
             view11->hide();
             button11->hide();
             view12->hide();
             button12->hide();
             view13->hide();
             button13->hide();
             view14->hide();
             button14->hide();
             view15->hide();
             button15->hide();
         }
         if(tb->getId()==3)
         {
             layout->addWidget(view3, 0, 0, 0, 4);
             button3->setText("Back");
             layout->addWidget(button3, 8,1);
             view->hide();
             button->hide();
             view1->hide();
             button1->hide();
             view2->hide();
             button2->hide();
             view4->hide();
             button4->hide();
             view5->hide();
             button5->hide();
             view6->hide();
             button6->hide();
             view7->hide();
             button7->hide();
             view8->hide();
             button8->hide();
             view9->hide();
             button9->hide();
             view10->hide();
             button10->hide();
             view11->hide();
             button11->hide();
             view12->hide();
             button12->hide();
             view13->hide();
             button13->hide();
             view14->hide();
             button14->hide();
             view15->hide();
             button15->hide();
         }
         if(tb->getId()==4)
         {
             layout->addWidget(view4, 0, 0, 0, 4);
             button4->setText("Back");
             layout->addWidget(button4, 8,1);
             view->hide();
             button->hide();
             view1->hide();
             button1->hide();
             view2->hide();
             button2->hide();
             view3->hide();
             button3->hide();
             view5->hide();
             button5->hide();
             view6->hide();
             button6->hide();
             view7->hide();
             button7->hide();
             view8->hide();
             button8->hide();
             view9->hide();
             button9->hide();
             view10->hide();
             button10->hide();
             view11->hide();
             button11->hide();
             view12->hide();
             button12->hide();
             view13->hide();
             button13->hide();
             view14->hide();
             button14->hide();
             view15->hide();
             button15->hide();
         }
         if(tb->getId()==5)
         {
             layout->addWidget(view5, 0, 0, 0, 4);
             button5->setText("Back");
             layout->addWidget(button5, 8,1);
             view->hide();
             button->hide();
             view1->hide();
             button1->hide();
             view2->hide();
             button2->hide();
             view3->hide();
             button3->hide();
             view4->hide();
             button4->hide();
             view6->hide();
             button6->hide();
             view7->hide();
             button7->hide();
             view8->hide();
             button8->hide();
             view9->hide();
             button9->hide();
             view10->hide();
             button10->hide();
             view11->hide();
             button11->hide();
             view12->hide();
             button12->hide();
             view13->hide();
             button13->hide();
             view14->hide();
             button14->hide();
             view15->hide();
             button15->hide();
         }
         if(tb->getId()==6)
         {
             layout->addWidget(view6, 0, 0, 0, 4);
             button6->setText("Back");
             layout->addWidget(button6, 8,1);
             view->hide();
             button->hide();
             view1->hide();
             button1->hide();
             view2->hide();
             button2->hide();
             view3->hide();
             button3->hide();
             view5->hide();
             button5->hide();
             view4->hide();
             button4->hide();
             view7->hide();
             button7->hide();
             view8->hide();
             button8->hide();
             view9->hide();
             button9->hide();
             view10->hide();
             button10->hide();
             view11->hide();
             button11->hide();
             view12->hide();
             button12->hide();
             view13->hide();
             button13->hide();
             view14->hide();
             button14->hide();
             view15->hide();
             button15->hide();
         }
         if(tb->getId()==7)
         {
             layout->addWidget(view7, 0, 0, 0, 4);
             button7->setText("Back");
             layout->addWidget(button7, 8,1);
             view->hide();
             button->hide();
             view1->hide();
             button1->hide();
             view2->hide();
             button2->hide();
             view3->hide();
             button3->hide();
             view5->hide();
             button5->hide();
             view6->hide();
             button6->hide();
             view4->hide();
             button4->hide();
             view8->hide();
             button8->hide();
             view9->hide();
             button9->hide();
             view10->hide();
             button10->hide();
             view11->hide();
             button11->hide();
             view12->hide();
             button12->hide();
             view13->hide();
             button13->hide();
             view14->hide();
             button14->hide();
             view15->hide();
             button15->hide();
         }
         if(tb->getId()==8)
         {
             layout->addWidget(view8, 0, 0, 0, 4);
             button8->setText("Back");
             layout->addWidget(button8, 8,1);
             view->hide();
             button->hide();
             view1->hide();
             button1->hide();
             view2->hide();
             button2->hide();
             view3->hide();
             button3->hide();
             view5->hide();
             button5->hide();
             view6->hide();
             button6->hide();
             view7->hide();
             button7->hide();
             view4->hide();
             button4->hide();
             view9->hide();
             button9->hide();
             view10->hide();
             button10->hide();
             view11->hide();
             button11->hide();
             view12->hide();
             button12->hide();
             view13->hide();
             button13->hide();
             view14->hide();
             button14->hide();
             view15->hide();
             button15->hide();
         }
         if(tb->getId()==9)
         {
             layout->addWidget(view9, 0, 0, 0, 4);
             button9->setText("Back");
             layout->addWidget(button9, 8,1);
             view->hide();
             button->hide();
             view1->hide();
             button1->hide();
             view2->hide();
             button2->hide();
             view3->hide();
             button3->hide();
             view5->hide();
             button5->hide();
             view6->hide();
             button6->hide();
             view7->hide();
             button7->hide();
             view8->hide();
             button8->hide();
             view4->hide();
             button4->hide();
             view10->hide();
             button10->hide();
             view11->hide();
             button11->hide();
             view12->hide();
             button12->hide();
             view13->hide();
             button13->hide();
             view14->hide();
             button14->hide();
             view15->hide();
             button15->hide();
         }
         if(tb->getId()==10)
         {
             layout->addWidget(view10, 0, 0, 0, 4);
             button10->setText("Back");
             layout->addWidget(button10, 8,1);
             view->hide();
             button->hide();
             view1->hide();
             button1->hide();
             view2->hide();
             button2->hide();
             view3->hide();
             button3->hide();
             view5->hide();
             button5->hide();
             view6->hide();
             button6->hide();
             view7->hide();
             button7->hide();
             view8->hide();
             button8->hide();
             view9->hide();
             button9->hide();
             view4->hide();
             button4->hide();
             view11->hide();
             button11->hide();
             view12->hide();
             button12->hide();
             view13->hide();
             button13->hide();
             view14->hide();
             button14->hide();
             view15->hide();
             button15->hide();
         }
         if(tb->getId()==11)
         {
             layout->addWidget(view11, 0, 0, 0, 4);
             button11->setText("Back");
             layout->addWidget(button11, 8,1);
             view->hide();
             button->hide();
             view1->hide();
             button1->hide();
             view2->hide();
             button2->hide();
             view3->hide();
             button3->hide();
             view5->hide();
             button5->hide();
             view6->hide();
             button6->hide();
             view7->hide();
             button7->hide();
             view8->hide();
             button8->hide();
             view9->hide();
             button9->hide();
             view10->hide();
             button10->hide();
             view4->hide();
             button4->hide();
             view12->hide();
             button12->hide();
             view13->hide();
             button13->hide();
             view14->hide();
             button14->hide();
             view15->hide();
             button15->hide();
         }
         if(tb->getId()==12)
         {
             layout->addWidget(view12, 0, 0, 0, 4);
             button12->setText("Back");
             layout->addWidget(button12, 8,1);
             view->hide();
             button->hide();
             view1->hide();
             button1->hide();
             view2->hide();
             button2->hide();
             view3->hide();
             button3->hide();
             view5->hide();
             button5->hide();
             view6->hide();
             button6->hide();
             view7->hide();
             button7->hide();
             view8->hide();
             button8->hide();
             view9->hide();
             button9->hide();
             view10->hide();
             button10->hide();
             view11->hide();
             button11->hide();
             view4->hide();
             button4->hide();
             view13->hide();
             button13->hide();
             view14->hide();
             button14->hide();
             view15->hide();
             button15->hide();
         }
         if(tb->getId()==13)
         {
             layout->addWidget(view13, 0, 0, 0, 4);
             button13->setText("Back");
             layout->addWidget(button13, 8,1);
             view->hide();
             button->hide();
             view1->hide();
             button1->hide();
             view2->hide();
             button2->hide();
             view3->hide();
             button3->hide();
             view5->hide();
             button5->hide();
             view6->hide();
             button6->hide();
             view7->hide();
             button7->hide();
             view8->hide();
             button8->hide();
             view9->hide();
             button9->hide();
             view10->hide();
             button10->hide();
             view11->hide();
             button11->hide();
             view12->hide();
             button12->hide();
             view4->hide();
             button4->hide();
             view14->hide();
             button14->hide();
             view15->hide();
             button15->hide();
         }
         if(tb->getId()==14)
         {
             layout->addWidget(view14, 0, 0, 0, 4);
             button14->setText("Back");
             layout->addWidget(button14, 8,1);
             view->hide();
             button->hide();
             view1->hide();
             button1->hide();
             view2->hide();
             button2->hide();
             view3->hide();
             button3->hide();
             view5->hide();
             button5->hide();
             view6->hide();
             button6->hide();
             view7->hide();
             button7->hide();
             view8->hide();
             button8->hide();
             view9->hide();
             button9->hide();
             view10->hide();
             button10->hide();
             view11->hide();
             button11->hide();
             view12->hide();
             button12->hide();
             view13->hide();
             button13->hide();
             view4->hide();
             button4->hide();
             view15->hide();
             button15->hide();
         }
         if(tb->getId()==15)
         {
             layout->addWidget(view15, 0, 0, 0, 4);
             button15->setText("Back");
             layout->addWidget(button15, 8,1);
             view->hide();
             button->hide();
             view1->hide();
             button1->hide();
             view2->hide();
             button2->hide();
             view3->hide();
             button3->hide();
             view5->hide();
             button5->hide();
             view6->hide();
             button6->hide();
             view7->hide();
             button7->hide();
             view8->hide();
             button8->hide();
             view9->hide();
             button9->hide();
             view10->hide();
             button10->hide();
             view11->hide();
             button11->hide();
             view12->hide();
             button12->hide();
             view13->hide();
             button13->hide();
             view14->hide();
             button14->hide();
             view4->hide();
             button4->hide();
         }
    count=1;
        }
        else
        {
            Back();
        }
    }
    
    void CheckUrl::Back()
    {
        count=0;
        layout->addWidget(view,0,0);
        view->show();
        layout->addWidget(view1,0,1);
         view1->show();
        layout->addWidget(view2,0,2);
         view2->show();
        layout->addWidget(view3,0,3);
         view3->show();
        layout->addWidget(button,1,0);
        button->show();
        layout->addWidget(button1,1,1);
         button1->show();
        layout->addWidget(button2,1,2);
         button2->show();
       layout->addWidget(button3,1,3);
        button3->show();
       layout->addWidget(view4,2,0);
        view4->show();
       layout->addWidget(view5,2,1);
        view5->show();
       layout->addWidget(view6,2,2);
        view6->show();
       layout->addWidget(view7,2,3);
        view7->show();
       layout->addWidget(button4,3,0);
        button4->show();
       layout->addWidget(button5,3,1);
        button5->show();
       layout->addWidget(button6,3,2);
        button6->show();
      layout->addWidget(button7,3,3);
       button7->show();
      layout->addWidget(view8,4,0);
       view8->show();
      layout->addWidget(view9,4,1);
       view9->show();
      layout->addWidget(view10,4,2);
       view10->show();
      layout->addWidget(view11,4,3);
       view11->show();
      layout->addWidget(button8,5,0);
       button8->show();
      layout->addWidget(button9,5,1);
       button9->show();
      layout->addWidget(button10,5,2);
       button10->show();
      layout->addWidget(button11,5,3);
       button11->show();
      layout->addWidget(view12,6,0);
       view12->show();
      layout->addWidget(view13,6,1);
       view13->show();
      layout->addWidget(view14,6,2);
       view14->show();
      layout->addWidget(view15,6,3);
       view15->show();
      layout->addWidget(button12,7,0);
       button12->show();
      layout->addWidget(button13,7,1);
       button13->show();
      layout->addWidget(button14,7,2);
       button14->show();
     layout->addWidget(button15,7,3);
      button15->show();
     layout->addWidget(button16,8,2);
     layout->addWidget(button17,8,3);
     button->setText("Show");
     button1->setText("Show");
     button2->setText("Show");
     button3->setText("Show");
     button4->setText("Show");
     button5->setText("Show");
     button6->setText("Show");
     button7->setText("Show");
     button8->setText("Show");
     button9->setText("Show");
     button10->setText("Show");
     button11->setText("Show");
     button12->setText("Show");
     button13->setText("Show");
     button14->setText("Show");
     button15->setText("Show");
    }
    
    
    
      Evgenii Legotckoi
      • May 2, 2017, 10:06 a.m.

      о_О
      Почитайте про динамическое создание виджетов . Чтобы не было таких портянок в программе. Тем более, что количество сайтов будет явно различным у разных пользователей. Поэтому нужно динамически создавать виджеты со скриншотами.

        KL
        • May 2, 2017, 10:27 a.m.

        Спасибо, обязательно прочту. Ваша статья о создании динамических QLabel помогла мне. Создал класс кнопки по аналогии с той программой.

          KL
          • May 2, 2017, 10:30 a.m.

          Не смейтесь), я писал на грани своих возможностей) Поборол как смог)

            Evgenii Legotckoi
            • May 2, 2017, 10:34 a.m.

            Ваши возможности безграничны, как и у любого другого человека. Их нужно только понемногу раздвигать. Но всё равно будет лучше, если я буду указывать на такие огрехи и сразу направлять вашу работу в нужное русло ))

              KL
              • May 2, 2017, 10:38 a.m.

              Конечно , спасибо вам за конструктивную критику, очень ценю и прислушиваюсь к вашим советам. Данное приложение направлено на проявление активности на сайтах где я размещал ссылки в профилях. Если слышали что то о "крауд маркетинге", то это сапорт программа для проявления активности. Не знаю, что с этого получится)

                Evgenii Legotckoi
                • May 2, 2017, 10:43 a.m.

                Прочитал сейчас в википедии про "крауд маркетинг".
                Значит количество сайтов однозначно будет нефиксированным. Поэтому осваивайте динамическое создание виджетов. Сайтов же будет много.
                Около двух лет назад я задумывал этот сайт, как просто профессиональный блог про сети передачи данных, поскольку работал как инженер ВОЛС, а сейчас я программист. Так что, что ни делается всё к лучшему. Что-нибудь да выйдет из этого.

                  Comments

                  Only authorized users can post comments.
                  Please, Log in or Sign up
                  AD

                  C ++ - Test 004. Pointers, Arrays and Loops

                  • Result:50points,
                  • Rating points-4
                  m

                  C ++ - Test 004. Pointers, Arrays and Loops

                  • Result:80points,
                  • Rating points4
                  m

                  C ++ - Test 004. Pointers, Arrays and Loops

                  • Result:20points,
                  • Rating points-10
                  Last comments
                  i
                  innorwallNov. 12, 2024, 6:12 a.m.
                  Django - Tutorial 055. How to write auto populate field functionality Freckles because of several brand names retin a, atralin buy generic priligy
                  i
                  innorwallNov. 12, 2024, 2:23 a.m.
                  QML - Tutorial 035. Using enumerations in QML without C ++ priligy cvs 24 Together with antibiotics such as amphotericin B 10, griseofulvin 11 and streptomycin 12, chloramphenicol 9 is in the World Health Organisation s List of Essential Medici…
                  i
                  innorwallNov. 11, 2024, 11:50 p.m.
                  Qt/C++ - Lesson 052. Customization Qt Audio player in the style of AIMP It decreases stress, supports hormone balance, and regulates and increases blood flow to the reproductive organs buy priligy online safe Promising data were reported in a PDX model re…
                  i
                  innorwallNov. 11, 2024, 10:19 p.m.
                  Heap sorting algorithm The role of raloxifene in preventing breast cancer priligy precio
                  i
                  innorwallNov. 11, 2024, 9:55 p.m.
                  PyQt5 - Lesson 006. Work with QTableWidget buy priligy 60 mg 53 have been reported by Javanovic Santa et al
                  Now discuss on the forum
                  i
                  innorwallNov. 12, 2024, 4:56 a.m.
                  добавить qlineseries в функции buy priligy senior brother Chu He, whom he had known for many years
                  i
                  innorwallNov. 11, 2024, 6:55 p.m.
                  Всё ещё разбираюсь с кешем. priligy walgreens levitra dulcolax carbs The third ring was found to be made up of ultra relativistic electrons, which are also present in both the outer and inner rings
                  9
                  9AnonimOct. 25, 2024, 4:10 p.m.
                  Машина тьюринга // Начальное состояние 0 0, ,<,1 // Переход в состояние 1 при пустом символе 0,0,>,0 // Остаемся в состоянии 0, двигаясь вправо при встрече 0 0,1,>…

                  Follow us in social networks