CefSharp Devtools in dock - cefsharp

It's possible with CefSharp WPF to render devtools in a dock, I managed to do it in a way that I render inside a handle, but devtools doesn't follow the parent window and doesn't look the way I want.

Related

Qt scroll or resize main window

I have an application, that is made for Full HD with Qt Creator. When now this application is opened on a screen with less resolution, the application is no more fully accessable and I'm not sure, what the best method would be to make still everything accessable.
So my first idea was to embed a scroll bar in the main window, but I don't like that and I would do this only, if no better method exists.
I would prefer to resize the whole application (all the fonts and buttons etc.) dynamically, but I found no way yet to do this. Is this even possible in Qt? If not, can I somehow move inside the application (for example drag the screen with the mouse) around, but without a scroll bar?

Qt/QML: Custom menu exceeding window boundaries

I want to create a custom Qt/QML menu like the main menu in Firefox:
As you can see, the menu can exceed the boundaries of the main window if it is bigger than the main window. Is there any way to achieve such behavior in Qt? I tried with the native Menu QML component, but this only gives me a default OS context menu with very vew customization options. I want full control over how the menu looks like and its contents (i.e. the same possibilities I have for a normal QML component or widget).
Qt Quick Controls 1 has Menus that are native and hence are not limited to window bounds.
Qt Quick Controls 2 does not yet have support for native Menus. You can track that here.
Qt Labs Platform has a native menu.
However, I doubt that any of these options will be sufficient in your case, as native menu support means utilising whatever the OS provides, which is probably not flexible enough to implement the menu shown in the image.
As mentioned by #hyde, one option may be to create a Window and implement your menu in there.

Build photo editor interface using Qt

I would like to create an application using Qt (PyQt5 specifically) that has a photo editor like interface. More specifically, I would like it to have:
No main window
Free-floating toolbar
Free-floating context window
Startup dialog
Edit-windows
The idea is to have the toolbar and context window persist for as along as the application is running. The user then opens one or multiple documents (e.g. images in the photo editor example) and uses the options in the toolbar to modify the document(s).
My first question is; does this type of application interface have a specific name, something akin to MDI or SDI? I've been searching for "photo editor interface" and variations on that, but haven't been able to find a search string that seems to hit the mark. For instance, I've tried "build a photo editor type interface with Qt" but it doesn't yield anything useful.
The second question I have is, what is the best way to build a Qt application that doesn't spawn a main window? It seems like I could kludge an assortment of dialogs together to make this happen, but I would really like to use a lot of the functionality of QMainWindow (toolbars, menus, top-level management of the application). Is there a way to launch QMainWindow, display the menu and toolbar, but suppress the main window?
I plan to primarily use this application on OSX, but would also like it to perform well on Windows and Linux.
QMenuBar has explicit support for OSX to have the menu bar behave as expected: http://doc.qt.io/qt-5/qmenubar.html#qmenubar-on-os-x
I think it'll also work on Ubuntu's Unity, which tries to have similar style, but there may be some details you need to take care of. Other desktops should work as expected.
As to how to have individual windows: any Qt widget will be a top level window if it has no parent, so that is an easy way to create windows. If you want to have parent windows (for example to control window stacking order automatically), there's a window flag for that. So you don't need to use QDialog (not sure if you were implying that in your question).
You want to read QWidget documentation carefully to get an idea how all this works.

How to resize the designer-space in qt-creator if needed when developing?

As I am putting more widgets on top of more layouts in my application, the space where I design the GUI is getting also bigger for the Qt-creator interface.
I have many buttons and frames which are out of reach. I cannot see them (or click them, of course). I don't know how they look until I run the whole application for debugging.
Is there is a way to zoom out/in the main frame (the whole playground) so that I can see my full GUI design on the UI of Qt IDE?
P.S.: I am working on macBook 13"
Zooming is not possible. You can use Tools -> Form Editor -> Preview.
If the viewport gets too small the QtCreator shows scrollbars which allow to move the part of interest into view.
Note, on some system configurations the scollbars may be very small and hard to handle.
You can use this steps
Tool-->options-> Text editor ->zoom
Text editor

Qt window that stays on top of the application, but not other windows

I am using with a MDI workspace.
I need a non-modal window that sits above everything in the workspace (or, everything in the application), but allows interaction with the workspace.
The following achieves that effect:
QDialog* widget = new QDialog();
widget->setModal(false);
widget->setWindowFlags(Qt::WindowStaysOnTopHint);
widget->show();
BUT--This window also stays on top of all other application windows that are running alongside my application. (As in, if I open Chrome, my window is on top of Chrome too.)
I would like for the window to stay on top of ONLY my application.
I am using Qt 4.8, but a 5.4-compatible solution would be ideal.
I am using Windows 7 Pro SP1, but naturally a platform independent solution is ideal.
Thank you!

Resources