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?
Forum Updated to NodeBB v4.3 + New Features

How I can to part?

Scheduled Pinned Locked Moved Unsolved Language Bindings
pyqt5
6 Posts 2 Posters 1.8k Views 1 Watching
  • 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 last edited by A Former User
    #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
    • mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on 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 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!!

        mrjjM 1 Reply Last reply
        0
        • D Dl10

          @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!!

          mrjjM Offline
          mrjjM Offline
          mrjj
          Lifetime Qt Champion
          wrote on 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 last edited by
            #5

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

            mrjjM 1 Reply Last reply
            0
            • D Dl10

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

              mrjjM Offline
              mrjjM Offline
              mrjj
              Lifetime Qt Champion
              wrote on 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

              • Login

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