Questions tagged [mainwindow]
157 questions
0
votes
0 answers
How to get an access authorization in the foreground of a WPF app? C#
I am writing a WPF app in C# which opens another program in the background. In my case I am opening TIA-Portal (a SIEMENS Software). To open a project the TIA-Portal needs an access authorization from the user. But the window of the access…

Victor .S
- 37
- 8
0
votes
0 answers
Change List from MainWindow in WPF
I am trying to change a List that bind to DataGrid from MainWindow (The List is in another class).
How do i do it?
The List contains Tuple with 2 strings and i want to change just the second string when the user enters new values to a textBox in a…

Ben
- 201
- 1
- 4
- 13
0
votes
3 answers
How to access MainWindow's variables from second Window
Is there another way to access MainWindow's public variables than :
MainWindow mainWindow = Application.Current.Windows.OfType().FirstOrDefault();
mainWindow.variable....
this work fine, but I'm creating a WPF application and…

TestMan
- 77
- 1
- 1
- 15
0
votes
1 answer
Qt - mainwindow class object in another class doesn't work well
void MyAnotherClass::mySlot(){
MainWindow window;
window.myFunction();}
void MainWindow::myFunction(){
qDebug() << "THIS qDebug works well but ui do NOT";
ui->textEdit->setText("Why i do not working?");
}
Why qDebug in this situation works fine,…

Artur Lodklif
- 83
- 1
- 9
0
votes
1 answer
WPF - How to make user resizing reasonable?
2 simple question about resizing in WPF (images included):
1) When I make my mainwindow user-resizable it seems that if the user would want to reduce the size - the whole window with its' components wouldn't become smaller, some of them will just…

Yair V.
- 109
- 1
- 10
0
votes
1 answer
QT C++ How can i access MainWindow UI from a different class
i'm beging work with QT and have a problem. I have a project with 4 classes and a mainWindow (dialog). My first problem is reading a txt.file.
If i put the code conteined in void fileTxt::setContaRigheFileTxt() into void…

Massimo D. N.
- 316
- 1
- 6
- 17
0
votes
0 answers
Can I resize QTWidgets when QTMainWindow grows without layout management?
I have searched on the internet for a long time but I couldn't find an answer to my question.
When resizing the main window of my application I want some of my widgets to grow.
A lot of answers I found were about using layout managers.
My…

Kikidr
- 11
- 1
0
votes
0 answers
Qt: how to set QDate (that is converted from QString) on QDateEdit field?
I have a QDateEdit field on my mainwindow.
I capture whatever date is selected by the user as QString before insert it into the database.
QString membership_Date = ui->memebershipDate->text();
Then, in case the user want to update the date, I…

McLan
- 2,552
- 9
- 51
- 85
0
votes
1 answer
Qt: advantage of creating child window only once an then just show() and hide()
I'm building an application using Qt (on linux). My application basically consists of 2 Windows To keep things simple lets just call them "A" and "B".
A is the application's "main window", some kind of "idle" window which is displayed (maximized)…

norzaw
- 1
- 1
0
votes
0 answers
Error in .g.i.cs file and nowhere else
I have a solution made of a project and a library
The library is a "WPF User Control Library" which holds a window called MegaBanner WF which is used as a MessageBox shaped in a better way.
When I build it I get no errors in regular files but two…

Patrick
- 3,073
- 2
- 22
- 60
0
votes
1 answer
AttributeError: 'bool' object has no attribute 'accept'
i´m new to using python and PyQt, and i´m making a PyQt project for my university. I´m writing this code:
import sys
from PyQt4.QtCore import *
from PyQt4.QtGui import *
from PyQt4 import uic
class Ventana(QMainWindow):
def __init__(self):
…

Pablo Flores
- 667
- 1
- 13
- 33
0
votes
1 answer
bind the text box of user control through mainwindow text
I am working on WPF project. I have created a user control name as "CanLogPaneView". this user control contains a Text box called "txt_CanLog".
I have bind this Text box as mentioned below:

Nikhil
- 1
- 2
0
votes
2 answers
WPF. if pop up window appear, main window brightness decrease //code-behind
I need that if my pop up window appear (after click) , the main window brightness has to decrease, maybe someone know how to do it?
Example:
EDIT: I create canvas, but do not know how to use it, brightness need decrease then pop up…

LTU
- 195
- 1
- 3
- 18
0
votes
2 answers
How to call a function in pyside MainWindow from another python script
This is my main.py I have a function called loadShot that I want to call from another
class MainWindow(QMainWindow):
# Main Window UI
def __init__(self, parent=None):
QMainWindow.__init__(self, parent)
…

Peter Collazo
- 3
- 4
0
votes
1 answer
MainWindow child in wpf application
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
System.Windows.Controls.Button b = new System.Windows.Controls.Button();
System.Windows.Shapes.Rectangle r = new…

Kamiel
- 21
- 3