done, it may be that there are still Widget that are too big in other places in the program, but the focus should now be that the QScrollArea is not asked if the screen is big enough.
never mind, fix.
You are not logged in. Please login or register.
QElectroTech → Posts by De-Backer
done, it may be that there are still Widget that are too big in other places in the program, but the focus should now be that the QScrollArea is not asked if the screen is big enough.
never mind, fix.
done, it may be that there are still Widget that are too big in other places in the program, but the focus should now be that the QScrollArea is not asked if the screen is big enough.
Can I Merge Branch feature_resize_gui in to master?
add
- class Machine_info
- QScrollArea (sources/configdialog.cpp)
this i have
/**
Constructeur
@param parent QWidget parent
*/
ConfigDialog::ConfigDialog(QWidget *parent) : QDialog(parent) {
// liste des pages
pages_list = new QListWidget();
pages_list -> setViewMode(QListView::IconMode);
pages_list -> setIconSize(QSize(128, 128));
pages_list -> setMovement(QListView::Static);
pages_list -> setMinimumWidth(168);
pages_list -> setMaximumWidth(168);
pages_list -> setSpacing(16);
pages_list -> setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
// pages
pages_widget = new QStackedWidget();
// boutons
buttons = new QDialogButtonBox(
QDialogButtonBox::Ok
|QDialogButtonBox::Cancel);
//
QScrollArea *scroll = new QScrollArea(this);
scroll->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOn);
scroll->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOn);
QWidget *viewport = new QWidget(this);
scroll->setWidget(viewport);
scroll->setWidgetResizable(true);
// layouts
QHBoxLayout *hlayout1 = new QHBoxLayout(viewport);
// add needed widgets to layout "hlayout1"
hlayout1 -> addWidget(pages_list);
hlayout1 -> addWidget(pages_widget);
//add hlayout1 to widget
viewport->setLayout(hlayout1);
// Add a layout for QDialog
QVBoxLayout *dialog_layout = new QVBoxLayout(this);
dialog_layout->addWidget(scroll); // add scroll to the QDialog's layout
dialog_layout -> addWidget(buttons);
setLayout(dialog_layout);
// connexion signaux / slots
connect(buttons, SIGNAL(accepted()), this, SLOT(applyConf()));
connect(buttons, SIGNAL(rejected()), this, SLOT(reject()));
connect(pages_list, SIGNAL(currentRowChanged(int)),
pages_widget, SLOT(setCurrentIndex(int)));
Machine_info *mymachineinfo= new Machine_info(this);
resize(mymachineinfo->get_max_screen_width(),
mymachineinfo->get_max_screen_height());
#ifdef Q_OS_MACOS
if (parent) {
setWindowFlags(Qt::Sheet);
}
#endif
}
I am thinking about using Qscrollarea
https://doc.qt.io/qt-5/qscrollarea.html
Or is there another solution?
This is a start will have to be adjusted further.
Branch: feature_resize_gui
why reinvent the wheel.
good idea scorpio810
I put it on the todo list.
-use kcrash for Crash Reporting for Developer
by the way, I get the KF5 lib not compiled correctly...
Now that we know the maximum values.
Start the real work, adjusting the gui.
Bdw. the plan was to adjust the gui if the screen is too small.
@scorpio810, CPU RAM .. this info will be useful for debugging and we have to put a log file.
eg https://docs.syncthing.net/dev/crashrep.html
@Simon,
if you could try this patch on Windows?
https://download.qelectrotech.org/qet/builds/nightly/
not yet.
on Win 10 no Qt installed
Now that we know the maximum values.
Start the real work, adjusting the gui.
#include <QScreen>
QElectroTech V 0.80-DEV
Compilation : GCC 9.3.0
Built with Qt 5.12.5 - Date : Jul 20 2020 : 21:31:12
Run with Qt 5.12.5 using 48 thread(s)
OS : linux - x86_64 - Version : Debian GNU/Linux bullseye/sid - Kernel : 5.7.9-vanilla
*** Qt screens ***
( 1 : 3840.2 x 2160.6 )
( 2 : 1920.1 x 1080.3 )Great! if you can push it?
ok
btw, interest thing to get CPU and GPU informations in about QET for debug.
https://forum.qt.io/topic/102337/how-to … cpu-name/4
thanks,
I compiled the kde incorrectly,
=> no QDebug available.
I try to solve this first.
https://cpp.hotexamples.com/fr/examples … mples.html
/*! Returns the width of the display in pixels. \sa screenHeight(), screenDepth() */ int QDirectPainter::screenWidth() { QScreen *screen = getPrimaryScreen(); if (!screen) return 0; return screen->deviceWidth(); }
can you get the code to work?
I can not do it.
this code works.
compilation_info += "<br> *** Qt screens *** </br>";
const auto screens = qApp->screens();
for (int ii = 0; ii < screens.count(); ++ii) {
compilation_info += "<br> ( "
+ QString::number(ii + 1)
+ " : "
+ QString::number(screens[ii]->geometry().width() * screens[ii]->devicePixelRatio())
+ " x "
+ QString::number(screens[ii]->geometry().height() * screens[ii]->devicePixelRatio())
+ " ) </br>";
}
SSD
saving is disabled, the problem remains
Don't get me wrong I said the problem is around reading and writing.
=> Drive
you still have an HDD instead of an SSD?
the cause will go about writing to and reading from the file.
RAM is ok CPU too.
Of course we look further in the code on our side, the OS and the PC is for you.
=> Drive
you still have an HDD instead of an SSD?
the cause will go about writing to and reading from the file.
RAM is ok CPU too.
pages_list -> setIconSize(QSize(64, 64));
works, but I don't think it will be solved yet.
the other widget will also be too big
and this is also the case for
pages_list-> setMaximumHeight(500);
we need to know the max size of the monitor and put it as max pixel for everything
QScreen *screen = QGuiApplication::primaryScreen();
QRect screenGeometry = screen->geometry();
int height = screenGeometry.height();
int width = screenGeometry.width();
https://doc.qt.io/qt-5/qscreen.html
test:
QScreen *screen = QGuiApplication::primaryScreen();
QRect screenGeometry = screen->geometry();
compilation_info += "</br> - height :" + QString::number(screenGeometry.height());
compilation_info += "</br> - width :" + QString::number(screenGeometry.width());
which
reSize Icon
or
pages_list-> setMaximumHeight(500);
(the screenshot)
for
https://qelectrotech.org/bugtracker/view.php?id=195
add
pages_list-> setMaximumHeight(500);
to
qet/sources/configdialog.cpp
ConfigDialog::ConfigDialog(QWidget *parent) : QDialog(parent) {
// liste des pages
pages_list = new QListWidget();
pages_list -> setViewMode(QListView::IconMode);
pages_list -> setIconSize(QSize(128, 128));
pages_list -> setMovement(QListView::Static);
pages_list -> setMinimumWidth(168);
pages_list -> setMaximumWidth(168);
pages_list -> setSpacing(16);
pages_list -> setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
pages_list-> setMaximumHeight(500);
or reSize Icon
ConfigDialog::ConfigDialog(QWidget *parent) : QDialog(parent) {
// liste des pages
pages_list = new QListWidget();
pages_list -> setViewMode(QListView::IconMode);
pages_list -> setIconSize(QSize(64, 64));
pages_list -> setMovement(QListView::Static);
pages_list -> setMinimumWidth(168);
pages_list -> setMaximumWidth(168);
pages_list -> setSpacing(16);
pages_list -> setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
If all email goes to debacker@qelectrotech.org then I have no problem with it.
I like to keep it separate so I can quickly track and find everything.
What does this mean?
Can I expect a lot of emails on my private email accunt?
Or is this a separate email accunt?
In short, what can I expect, what wil happen?
After I have deeply thought about it, I have created a account "debacker"
If you still want me for the dev team you can add me.
loading class MasterPropertiesWidget seems to cause delays (making the slave elemente image)
@josaar2001 Can you confirm that the hitch only happens when a master element is selected?
(note tested on 0.7)
Yet why do I not get those stutters.
Frustrated to know that there is a problem and that I cannot simulate it.
I will make low specs VM machine and test it.
Maybe there is something wrong with the installer version of QElectroTech?
Or the elements user collection is too large?
@josaar2001
Can you try the Ready-to-use versions on your PC?
QElectroTech → Posts by De-Backer
Powered by PunBB, supported by Informer Technologies, Inc.
Generated in 0.022 seconds (50% PHP - 50% DB) with 5 queries