I am trying to resize the window screen, but it seems that the OS is ignoring my request. I am using Windows 10 and Intellij Community Edition.
application {
Window(onCloseRequest = ::exitApplication) {
window.setSize(600,800)
}
}
However, I can modify the other properties of the window, such as the location, whether it can be resized, etc. It seems that some agent is overriding or ignoring my resize request. Any idea where the problem could be?
This works:
window.setLocation(0,0)
window.isResizable = false
Thank you :)
Related
I am developing an Wear OS App, that requires to have the screen always on for certain tasks.
To achieve that, I use window.addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
It is working fine, but when I show an Dialog, the screen turns off after a few seconds.
I do not want to increase the timeout , but instead I need to keep the screen on while the dialog is showing on the screen.
I tried to use android:keepScreenOn="true" on my activity and it's working fine until I show Dialog.
There is how I create dialog.
val binding = ProgressLayoutWithTextBinding.inflate(LayoutInflater.from(context))
val dialog = Dialog(context)
binding.textProgress.text = message
dialog.setCancelable(false)
dialog.setContentView(binding.root)
dialog.show()
I'm using galaxy watch 4 (SM-R880)
Has anyone encountered this problem on a watch?
Yes, I've had this problem.
Solved it by
dialog.show()
dialog.window?.addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON)
I have a QMainWindow Application that uses several QToolBars. My program works on Linux, Windows and MacOS, however on MacOs the QToolbar behaves a little bit funky. When attached to the MainWindow it is just black as shown here
When I detach it it is grey as you would expect it to be
Also when I maximize to program the toolbar creates artifacts like this
Do I need any MacOS specific things for the QToolBar?
I'm hitting this bug too. I think it is linked to using non-alien widgets inside the toolbar or app wide.
Are you using setAttribute(Qt::AA_NativeWindows);? If so, try removing it.
Would you happen to have a QGLWidget-based UI element in your application? If so, apparently this is a known issue.
https://bugreports.qt.io/browse/QTBUG-41679
I am experiencing the "double-vision" aspect of this on a Qt 5.7.0-based app.
My application uses OpenCV, OpenGL, and Qt to display a webcam feed. It works perfectly on Ubuntu (clicking buttons works properly), but on OSX there seems to be a UI problem. The window displays, but I can't click and I quickly just get the loading spinning pinwheel and it doesn't stop until I force quit the application. Has anyone come across this problem before?
I solved this by adding a timer to the initialization of my gui widget:
m_timer = new QTimer();
connect(m_timer, SIGNAL(timeout()), this, SLOT(gotNewImage()));
m_timer->start(1);
where gotNewImage() is the function I call to grab a new image.
My application can go into fullscreen mode.
But it always 'opens' behind Windows Media Center, and I need my air app to display above the media center.
I found this article: http://msdn.microsoft.com/en-us/library/windows/desktop/bb189148.aspx
At the overlaying part it says "It is not possible to overlay anything other than a dialog box or a prompt over the Windows Media Center full-screen video experience."
I assume I might need to write a C# app to display a dialog over the media center?
Any other ideas are much appreciated.
My code:
this.stage.nativeWindow.activate();
this.stage.nativeWindow.restore();
this.stage.nativeWindow.maximize();
stage.displayState = StageDisplayState.FULL_SCREEN_INTERACTIVE;
Try to set alwaysInFront property of NativeWindow to true
I have a dual screen Air app (AS3 project) and I ran media center (Windows 7) at full screen then ran my app. My app opens focused.
Here are some of my settings, hope this helps.
Main Stage:
stage.displayState = StageDisplayState.FULL_SCREEN_INTERACTIVE;
Pop screen:
with(popScreenOptions){
type = NativeWindowType.NORMAL;
minimizable = false;
resizable = false;
maximizable = false;
systemChrome = NativeWindowSystemChrome.NONE;
transparent = false;
}
i want to make an animated wallpaper for windows. So far i have only expreience with Mac OS X programming and i'm new to windows. So i decided to work with QT because it seems that there is more help out there.
Until now i have created the app in a borderless window in qt. It work quiet fine.
But is there a way in QT to change the level of the window so that its appear above the windows wallpaper but behind the icons?
EDIT:
Ok if found a simple solution.
After some testing with the hints form kusg1 I figured out when there is a transparent window mouse events going still to the desktop.
I actualy want have this website has wallpaper: Ticketack. - So i created a frameless window which stays on bottom and has a transparent background and displays the text. Beside this i can change the windows wallpaper directly to get the background of the clock.
So clock text is not behind the icons but i think this will be ok.
Just some ideas: Use the windows flag as Qt::Window | Qt::FramelessWindowHint + Windows Stay at bottom hint, and set the content of the widget with your animated content (the suitable candidate is to use QGraphicsView).
The widget needs two main tasks:
Upon launching, it grabs the desktop background as pixmap and do overlay with the animated content (this needs to have the desktop to be wallpaper-less for simple scenario).
The widget needs to capture mouse and focus event and channel back to actual window command if the user wants to click the icon on the desktop.
Update:
Some pointers for the implementation:
For managing desktop icon, there is a good article here! (also found from SO).
Qt example and demos has an example on the taking desktop snapshot, the snippet is: QPixmap::grabWindow(QApplication::desktop()->winId());
Answer to your question: no, there isn't.
However, you can try something like this using Windows API: How to draw directly on the Windows desktop, C#?