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. Qt equivalent to MS UserControls

Qt equivalent to MS UserControls

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 3.6k 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.
  • C Offline
    C Offline
    cosmos2469
    wrote on last edited by
    #1

    I have an app written in C# that we are wanting to port to Qt. The idea of the app is straightforward - it contains several menu items and depending on which menu item you select, different operations appear in the central widget area (different buttons, datagrids, etc.). The functions for each screen was implemented with a UserControl and it was only a matter of displaying the correct UserControl. I thought it would be easy to implement the same thing in Qt using Widget, but I ran into a few oddities:

    1. Creating a Widget gives a caption bar which is not desired for this app (the caption on the application window is fine) - is there a way to turn off the caption in a widget? This way I can dispay the Widget in my main application's central widget area and it appears that various "screens" appear but without a caption.

    2. KDialog is the closest thing I found to solve issue #1, but it has few quirks. I want to overlay each "screen" in the same place on the Qapplication. But Qt wants to build a parent/child relationship with each KDialog that I overlay on the screen.

    As a complete newbie to Qt, I would appreciate any input/thoughts/guideliens/examples.

    Thanks for your time

    1 Reply Last reply
    0
    • G Offline
      G Offline
      goetz
      wrote on last edited by
      #2
      1. Widget/Caption
        A widget only has a caption bar when it is displayed as toplevel widget. As soon as you put it into some other widget, it is frameless.

      2. Overlays
        Seems like "QStackedWidget":http://doc.qt.nokia.com/4.7/qstackedwidget.html could do what you want.

      As you are completely new to Qt, I'd propose to go through some tutorials:

      • "How to learn Qt":http://doc.qt.nokia.com/4.7/how-to-learn-qt.html
      • "Getting Started Programming with Qt":http://doc.qt.nokia.com/4.7/gettingstartedqt.html (translations in the "wiki":http://developer.qt.nokia.com/wiki/Category:Learning::GettingStarted)
      • "Tutorials overview":http://doc.qt.nokia.com/4.7/tutorials.html

      http://www.catb.org/~esr/faqs/smart-questions.html

      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