Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Language Bindings
  4. How I can to part?
QtWS25 Last Chance

How I can to part?

Scheduled Pinned Locked Moved Unsolved Language Bindings
pyqt5
6 Posts 2 Posters 1.7k 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.
  • D Offline
    D Offline
    Dl10
    wrote on 26 Dec 2017, 08:22 last edited by A Former User 1 Jan 2018, 13:27
    #1

    hi all,
    how i can to part my project to 4 frames Equal.
    and in one them to show a video for file i choose. like "open --> file".
    all project in python ind i using PyQt5

    tnx

    1 Reply Last reply
    0
    • M Offline
      M Offline
      mrjj
      Lifetime Qt Champion
      wrote on 26 Dec 2017, 11:41 last edited by
      #2

      Hi
      Its a bit hard with the language. so im guessing a bit :)

      You mean split the mainwindow in 4 sections ?
      alt text

      You can use a Grid layout.

      1 Reply Last reply
      0
      • D Offline
        D Offline
        Dl10
        wrote on 26 Dec 2017, 11:50 last edited by
        #3

        @mrjj said in how i can to part ..:

        Grid layout

        hi, i mean for what you did!
        can you send me to the code are do this in python?
        tnx!!

        M 1 Reply Last reply 26 Dec 2017, 11:55
        0
        • D Dl10
          26 Dec 2017, 11:50

          @mrjj said in how i can to part ..:

          Grid layout

          hi, i mean for what you did!
          can you send me to the code are do this in python?
          tnx!!

          M Offline
          M Offline
          mrjj
          Lifetime Qt Champion
          wrote on 26 Dec 2017, 11:55 last edited by
          #4

          @Dl10
          Hi
          I just did it Designer but not sure it works with python ?

          anyway, here is the c++ code.
          Sorry i never used python.

          // variables
              QWidget *centralWidget;
              QGridLayout *gridLayout;
              QFrame *frame;
              QFrame *frame_2;
              QFrame *frame_3;
              QFrame *frame_4;
          // create a Grid and put frames to it
                  gridLayout = new QGridLayout(centralWidget);
                  gridLayout->setSpacing(6);
                  gridLayout->setContentsMargins(11, 11, 11, 11);
                  gridLayout->setObjectName(QStringLiteral("gridLayout"));
          
                  frame = new QFrame(centralWidget); // centralWidget is in MainWindow
                  frame->setObjectName(QStringLiteral("frame"));
                  frame->setFrameShape(QFrame::Box);
                  frame->setFrameShadow(QFrame::Raised);
          
                  gridLayout->addWidget(frame, 0, 0, 1, 1);
          
                  frame_2 = new QFrame(centralWidget);
                  frame_2->setObjectName(QStringLiteral("frame_2"));
                  frame_2->setFrameShape(QFrame::Box);
                  frame_2->setFrameShadow(QFrame::Raised);
          
                  gridLayout->addWidget(frame_2, 0, 1, 1, 1);
          
                  frame_3 = new QFrame(centralWidget);
                  frame_3->setObjectName(QStringLiteral("frame_3"));
                  frame_3->setFrameShape(QFrame::Box);
                  frame_3->setFrameShadow(QFrame::Raised);
          
                  gridLayout->addWidget(frame_3, 1, 0, 1, 1);
          
                  frame_4 = new QFrame(centralWidget);
                  frame_4->setObjectName(QStringLiteral("frame_4"));
                  frame_4->setFrameShape(QFrame::Box);
                  frame_4->setFrameShadow(QFrame::Raised);
          
                  gridLayout->addWidget(frame_4, 1, 1, 1, 1);
          
          
          
          
          1 Reply Last reply
          1
          • D Offline
            D Offline
            Dl10
            wrote on 26 Dec 2017, 11:58 last edited by
            #5

            are you know Designer for python? and i will did this.

            M 1 Reply Last reply 26 Dec 2017, 12:08
            0
            • D Dl10
              26 Dec 2017, 11:58

              are you know Designer for python? and i will did this.

              M Offline
              M Offline
              mrjj
              Lifetime Qt Champion
              wrote on 26 Dec 2017, 12:08 last edited by
              #6

              @Dl10

              Hi
              I think it exists

              https://www.youtube.com/watch?v=Dmo8eZG5I2w

              There you just place 4 qframes on center mainwindow
              Then right click (not on frames) and from layout menu
              select Grid layout

              1 Reply Last reply
              0

              4/6

              26 Dec 2017, 11:55

              • Login

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