Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Adding calendar without changing layout
Forum Updated to NodeBB v4.3 + New Features

Adding calendar without changing layout

Scheduled Pinned Locked Moved Unsolved General and Desktop
8 Posts 3 Posters 602 Views 2 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.
  • VineelaV Offline
    VineelaV Offline
    Vineela
    wrote on last edited by
    #1

    I have a text box in my Qt Designer for DOB insertion, where i need to add calendar in layout but hiding it too which should not disturb my design layout.

    jsulmJ 1 Reply Last reply
    0
    • VineelaV Vineela

      I have a text box in my Qt Designer for DOB insertion, where i need to add calendar in layout but hiding it too which should not disturb my design layout.

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @Vineela You could use QTabWidget: on one tab you have the text box on the other the calendar and then simply switch between tabs as needed.

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      VineelaV 1 Reply Last reply
      0
      • jsulmJ jsulm

        @Vineela You could use QTabWidget: on one tab you have the text box on the other the calendar and then simply switch between tabs as needed.

        VineelaV Offline
        VineelaV Offline
        Vineela
        wrote on last edited by
        #3

        @jsulm how do i hide them then

        jsulmJ 2 Replies Last reply
        0
        • VineelaV Vineela

          @jsulm how do i hide them then

          jsulmJ Offline
          jsulmJ Offline
          jsulm
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @Vineela Do you want to hide both at the same time? If so then simply call hide() on the tab widget.

          https://forum.qt.io/topic/113070/qt-code-of-conduct

          VineelaV 1 Reply Last reply
          0
          • VineelaV Vineela

            @jsulm how do i hide them then

            jsulmJ Offline
            jsulmJ Offline
            jsulm
            Lifetime Qt Champion
            wrote on last edited by
            #5

            @Vineela Oh, sorry! I actually mean QStackedWidget :-)

            https://forum.qt.io/topic/113070/qt-code-of-conduct

            1 Reply Last reply
            0
            • jsulmJ jsulm

              @Vineela Do you want to hide both at the same time? If so then simply call hide() on the tab widget.

              VineelaV Offline
              VineelaV Offline
              Vineela
              wrote on last edited by
              #6

              @jsulm i need calendar to be hide when i run page and sorry my coding lang is in python how do i do it then

              jsulmJ 1 Reply Last reply
              0
              • VineelaV Vineela

                @jsulm i need calendar to be hide when i run page and sorry my coding lang is in python how do i do it then

                jsulmJ Offline
                jsulmJ Offline
                jsulm
                Lifetime Qt Champion
                wrote on last edited by
                #7

                @Vineela Let's clarify it, because I'm still not sure what you really want: you show text box. Then at some point you want to show calendar and afterwards go back to text box? Is this correct? Do you want to show the calendar over the text box? If not where?

                " my coding lang is in python how do i do it then" - same way you do it with other Qt widgets, only the programming language syntax is different.

                https://forum.qt.io/topic/113070/qt-code-of-conduct

                1 Reply Last reply
                1
                • artwawA Offline
                  artwawA Offline
                  artwaw
                  wrote on last edited by artwaw
                  #8

                  Other approach might be a button or an icon (or even a key combination) which displays calendar widget as a popup (I prefer that when working with QLineEdit, always add it as an action with icon).

                  Anyway, popup approach would have nothing to do with your layout and be displayed only on demand (triggered either by user implicitly or by your code when certain criteria are met).

                  For more information please re-read.

                  Kind Regards,
                  Artur

                  1 Reply Last reply
                  3

                  • Login

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