1 (edited by De-Backer 2020-07-19 23:04:46)

Topic: Resizing of border line of software

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);

Post's attachments

Attachment icon Screenshot_20200719_225346.png 94.55 kb, 8 downloads since 2020-07-19 

Re: Resizing of border line of software

Great, you could add it?

3 (edited by De-Backer 2020-07-19 23:14:49)

Re: Resizing of border line of software

which
reSize Icon
or

pages_list-> setMaximumHeight(500);

(the screenshot)

Re: Resizing of border line of software

Maybe better with a resize icon if not simply add: pages_list-> setMaximumHeight(500) to use scrollarea;

5 (edited by De-Backer 2020-07-19 23:33:36)

Re: Resizing of border line of software

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());

Post's attachments

Screenshot_20200719_233312.png, 38.1 kb, 747 x 196
Screenshot_20200719_233312.png 38.1 kb, 32 downloads since 2020-07-19 

Re: Resizing of border line of software

Wrong values..

QElectroTech V 0.80-DEV
Compilation : GCC 9.3.0
Built with Qt 5.12.5 - Date : Jul 20 2020 : 10:50:43
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 - height :1662 - width :2954

xrandr
Screen 0: minimum 320 x 200, current 5759 x 2160, maximum 16384 x 16384
DisplayPort-0 connected primary 3840x2160+0+0 (normal left inverted right x axis y axis) 600mm x 340mm
   3840x2160     60.00*+  30.00  
   2560x1440     59.95  
   1920x1200     60.00  
   1920x1080     60.00    59.94  
   1600x1200     60.00  
   1680x1050     60.00  
   1600x900      60.00  
   1280x1024     60.02  
   1440x900      60.00  
   1280x800      59.81  
   1280x720      60.00    59.94  
   1024x768      60.00  
   800x600       60.32  
   720x480       60.00    59.94  
   640x480       60.00    59.94  
HDMI-A-0 connected 1920x1080+3839+0 (normal left inverted right x axis y axis) 598mm x 336mm
   1920x1080     60.00*+  50.00    59.94  
   1680x1050     59.88  
   1280x1024     60.02  
   1440x900      59.90  
   1280x800      60.00  
   1280x720      60.00    50.00    59.94  
   1024x768      60.00  
   800x600       60.32  
   720x576       50.00  
   720x480       60.00    59.94  
   640x480       66.67    60.00    59.94  
   720x400       70.08  
DVI-D-0 disconnected (normal left inverted right x axis y axis)

Post's attachments

Attachment icon qscreen.png 107.79 kb, 8 downloads since 2020-07-20 

7 (edited by De-Backer 2020-07-20 11:22:55)

Re: Resizing of border line of software

https://stackoverflow.com/questions/259 … n-geometry

https://doc.qt.io/qt-5/qscreen.html#dev … Ratio-prop

Re: Resizing of border line of software

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();
}

9 (edited by De-Backer 2020-07-20 21:29:26)

Re: Resizing of border line of software

scorpio810 wrote:

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>";
    }

Post's attachments

Screenshot_20200720_212901.png, 36.06 kb, 594 x 151
Screenshot_20200720_212901.png 36.06 kb, 30 downloads since 2020-07-20 

Re: Resizing of border line of software

#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?

Re: Resizing of border line of software

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

https://thecodeprogram.com/reading-deta … ith-qt-c--
https://github.com/thecodeprogram/Syste … e/main.cpp
https://doc.qt.io/QtApplicationManager/ … tatus.html

Re: Resizing of border line of software

scorpio810 wrote:

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

https://doc.qt.io/QtApplicationManager/ … tatus.html

thanks,

I compiled the kde incorrectly,
=> no QDebug available.

I try to solve this first.

Re: Resizing of border line of software

scorpio810 wrote:

#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

Re: Resizing of border line of software

Now that we know the maximum values.
Start the real work, adjusting the gui.

Re: Resizing of border line of software

@De-Backer
Welkom op dit forum.

@scorpio810
You forget
17:9     = 2K (2048 X 1080 ) and 4K (4096 X 2160) screens

see picture :
https://commons.wikimedia.org/wiki/File … dards8.svg

Erik

Re: Resizing of border line of software

Add Linux cpu info 'model name'

#else
    compilation_info += "  GCC " + QString(__VERSION__);
    compilation_info += "<br>Built with Qt " + QString(QT_VERSION_STR);
    compilation_info += " - Date : " + QString(__DATE__);
    compilation_info += " : " + QString(__TIME__);
    compilation_info += " <br>Run with Qt "+ QString(qVersion());
    compilation_info += " using" + QString(" %1 thread(s)").arg(QThread::idealThreadCount());
 
QProcess linuxcpuinfo;
         linuxcpuinfo.start("bash", QStringList() << "-c" << "cat /proc/cpuinfo | grep 'model name' | uniq");
         linuxcpuinfo.waitForFinished();
         QString linuxOutput = linuxcpuinfo.readAllStandardOutput();
    compilation_info += "<br>" + QString(linuxOutput.toLocal8Bit().constData());
 
    compilation_info +=  QString(QSysInfo::currentCpuArchitecture().toUpper());
    compilation_info += "<br>" "  OS : " +  QString(QSysInfo::kernelType());
    compilation_info += "  -   " + QString(QSysInfo::currentCpuArchitecture());
    compilation_info += " -  Version :    " + QString(QSysInfo::prettyProductName());
    compilation_info += "</br>" " -  Kernel :     " + QString(QSysInfo::kernelVersion());
    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>";
     }
 
#endif
#endif

Post's attachments

cpuinfo.png, 63.33 kb, 910 x 650
cpuinfo.png 63.33 kb, 28 downloads since 2020-07-21 

Re: Resizing of border line of software

Nice example but in qml ...
https://doc.qt.io/QtApplicationManager/ … ample.html

https://stackoverflow.com/questions/183 … pplication
https://docs.microsoft.com/fr-fr/window … dfrom=MSDN

Re: Resizing of border line of software

Add Linux gpu info 'model name'

QString OSName = QSysInfo::kernelType();
    if (OSName == "linux")
    {
    QProcess linuxcpuinfo;
    linuxcpuinfo.start("bash", QStringList() << "-c" << "cat /proc/cpuinfo |grep 'model name' | uniq");
    linuxcpuinfo.waitForFinished();
    QString linuxOutput = linuxcpuinfo.readAllStandardOutput();
    compilation_info +=  "<br>"" CPU : " + QString(linuxOutput.toLocal8Bit().constData());
 
    QProcess linuxgpuinfo;
    linuxgpuinfo.start("bash", QStringList() << "-c" << "lspci | grep VGA | cut -d : -f 3");
    linuxgpuinfo.waitForFinished();
    QString linuxGPUOutput = linuxgpuinfo.readAllStandardOutput();
    compilation_info += "<br>"" GPU : " + QString(linuxGPUOutput.toLocal8Bit().constData());
    }

Post's attachments

gpuinfo.png, 74.4 kb, 910 x 650
gpuinfo.png 74.4 kb, 31 downloads since 2020-07-21 

Re: Resizing of border line of software

@Simon,
if you could try this patch on Windows?

Post's attachments

Attachment icon 0001-AboutQETDialog-try-to-add-cpuifo-model-name-and-AM-T (1).patch 1.76 kb, 35 downloads since 2020-07-21 

ram.png, 80.97 kb, 910 x 650
ram.png 80.97 kb, 30 downloads since 2020-07-21 

Re: Resizing of border line of software

scorpio810 wrote:

@Simon,
if you could try this patch on Windows?

https://download.tuxfamily.org/qet/builds/nightly/

not yet.
on Win 10 no Qt installed

21 (edited by De-Backer 2020-07-21 19:05:04)

Re: Resizing of border line of software

De-Backer wrote:

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

Re: Resizing of border line of software

Maybe add other KF5 lib like https://github.com/KDE/kcrash

But I disable KCrash in my cross-compile env for windows. not compile..

# core KF5 frameworks dependencies
${MXE_BUILD_TARGETS}-cmake --build . --config RelWithDebInfo --target ext_extra-cmake-modules -- -j$CPU_CORES
${MXE_BUILD_TARGETS}-cmake --build . --config RelWithDebInfo --target ext_kconfig             -- -j$CPU_CORES
${MXE_BUILD_TARGETS}-cmake --build . --config RelWithDebInfo --target ext_breeze-icons        -- -j$CPU_CORES
${MXE_BUILD_TARGETS}-cmake --build . --config RelWithDebInfo --target ext_kcoreaddons         -- -j$CPU_CORES
${MXE_BUILD_TARGETS}-cmake --build . --config RelWithDebInfo --target ext_kwindowsystem       -- -j$CPU_CORES
${MXE_BUILD_TARGETS}-cmake --build . --config RelWithDebInfo --target ext_solid               -- -j$CPU_CORES
${MXE_BUILD_TARGETS}-cmake --build . --config RelWithDebInfo --target ext_threadweaver        -- -j$CPU_CORES
${MXE_BUILD_TARGETS}-cmake --build . --config RelWithDebInfo --target ext_karchive            -- -j$CPU_CORES
${MXE_BUILD_TARGETS}-cmake --build . --config RelWithDebInfo --target ext_kdbusaddons         -- -j$CPU_CORES
${MXE_BUILD_TARGETS}-cmake --build . --config RelWithDebInfo --target ext_ki18n               -- -j$CPU_CORES
#${MXE_BUILD_TARGETS}-cmake --build . --config RelWithDebInfo --target ext_kcrash              -- -j$CPU_CORES
#${MXE_BUILD_TARGETS}-cmake --build . --config RelWithDebInfo --target ext_kcodecs             -- -j$CPU_CORES
#${MXE_BUILD_TARGETS}-cmake --build . --config RelWithDebInfo --target ext_kauth               -- -j$CPU_CORES
${MXE_BUILD_TARGETS}-cmake --build . --config RelWithDebInfo --target ext_kguiaddons          -- -j$CPU_CORES
${MXE_BUILD_TARGETS}-cmake --build . --config RelWithDebInfo --target ext_kwidgetsaddons      -- -j$CPU_CORES
#${MXE_BUILD_TARGETS}-cmake --build . --config RelWithDebInfo --target ext_kitemviews          -- -j$CPU_CORES
#${MXE_BUILD_TARGETS}-cmake --build . --config RelWithDebInfo --target ext_kcompletion         -- -j$CPU_CORES
#${MXE_BUILD_TARGETS}-cmake --build . --config RelWithDebInfo --target ext_kconfigwidgets      -- -j$CPU_CORES
#${MXE_BUILD_TARGETS}-cmake --build . --config RelWithDebInfo --target ext_kiconthemes         -- -j$CPU_CORES
#${MXE_BUILD_TARGETS}-cmake --build . --config RelWithDebInfo --target ext_kservice            -- -j$CPU_CORES
#${MXE_BUILD_TARGETS}-cmake --build . --config RelWithDebInfo --target ext_kglobalaccel        -- -j$CPU_CORES
#${MXE_BUILD_TARGETS}-cmake --build . --config RelWithDebInfo --target ext_kxmlgui             -- -j$CPU_CORES
#${MXE_BUILD_TARGETS}-cmake --build . --config RelWithDebInfo --target ext_kbookmarks          -- -j$CPU_CORES
#${MXE_BUILD_TARGETS}-cmake --build . --config RelWithDebInfo --target ext_kimageformats       -- -j$CPU_CORES

23 (edited by De-Backer 2020-07-21 19:47:36)

Re: Resizing of border line of software

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...

Re: Resizing of border line of software

URL transformed to HTTPS due to an HSTS policy
--2020-07-21 19:47:32--  https://download.kde.org/stable/framewo … 0.0.tar.xz
Résolution de download.kde.org (download.kde.org)… 2a01:4f8:171:1f24::3, 136.243.156.189
Connexion à download.kde.org (download.kde.org)|2a01:4f8:171:1f24::3|:443… connecté.
requête HTTP transmise, en attente de la réponse… 302 Found
Emplacement : http://ftp.kaist.ac.kr/kde/stable/frame … 0.0.tar.xz [suivant]
--2020-07-21 19:47:33--  http://ftp.kaist.ac.kr/kde/stable/frame … 0.0.tar.xz
Résolution de ftp.kaist.ac.kr (ftp.kaist.ac.kr)… 103.22.220.133
Connexion à ftp.kaist.ac.kr (ftp.kaist.ac.kr)|103.22.220.133|:80… connecté.
requête HTTP transmise, en attente de la réponse… 200 OK
Taille : 22320 (22K) [application/x-xz, application/x-xz]
Sauvegarde en : « /media/backup2/digikam/project/bundles/mxe/temp.dwnld/kcrash-5.70.0.tar.xz »

     0K .......... .......... .                               100% 70,9K=0,3s

2020-07-21 19:47:34 (70,9 KB/s) — « /media/backup2/digikam/project/bundles/mxe/temp.dwnld/kcrash-5.70.0.tar.xz » sauvegardé [22320/22320]

[  0%] Performing download step (verify and extract) for 'ext_kcrash'
-- verifying file...
     file='/media/backup2/digikam/project/bundles/mxe/temp.dwnld/kcrash-5.70.0.tar.xz'
-- verifying file... done
-- extracting...
     src='/media/backup2/digikam/project/bundles/mxe/temp.dwnld/kcrash-5.70.0.tar.xz'
     dst='/media/backup2/digikam/project/bundles/mxe/temp.build/ext_kf5_frameworks/ext_kcrash-prefix/src/ext_kcrash'
-- extracting... [tar xfz]
-- extracting... [analysis]
-- extracting... [rename]
-- extracting... [clean up]
-- extracting... done
[100%] No patch step for 'ext_kcrash'
[100%] No update step for 'ext_kcrash'
[100%] Performing configure step for 'ext_kcrash'
-- The C compiler identification is GNU 9.3.0
-- The CXX compiler identification is GNU 9.3.0
-- Check for working C compiler: /media/backup2/digikam/project/bundles/mxe/build.win32/usr/x86_64-pc-linux-gnu/bin/i686-w64-mingw32.static-gcc
-- Check for working C compiler: /media/backup2/digikam/project/bundles/mxe/build.win32/usr/x86_64-pc-linux-gnu/bin/i686-w64-mingw32.static-gcc - works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /media/backup2/digikam/project/bundles/mxe/build.win32/usr/x86_64-pc-linux-gnu/bin/i686-w64-mingw32.static-g++
-- Check for working CXX compiler: /media/backup2/digikam/project/bundles/mxe/build.win32/usr/x86_64-pc-linux-gnu/bin/i686-w64-mingw32.static-g++ - works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
--

Installing in /media/backup2/digikam/project/bundles/mxe/build.win32/usr/i686-w64-mingw32.static. Run /media/backup2/digikam/project/bundles/mxe/temp.build/ext_kf5_frameworks/ext_kcrash-prefix/src/ext_kcrash-build/prefix.sh to set the environment for KCrash.
-- Looking for __GLIBC__
-- Looking for __GLIBC__ - not found
-- Performing Test HAVE_DATE_TIME
-- Performing Test HAVE_DATE_TIME - Success
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE 
-- Performing Test COMPILER_HAS_DEPRECATED_ATTR
-- Performing Test COMPILER_HAS_DEPRECATED_ATTR - Success
-- The following features have been enabled:

* Core Pattern Raising, Raising signals to kernel core patterns (iff the pattern is a process). You may wish to not install drkonqi if this can cause a UI conflict.

-- The following REQUIRED packages have been found:

* ECM (required version >= 5.70.0), Extra CMake Modules., <https://commits.kde.org/extra-cmake-modules>
* Qt5 (required version >= 5.12.0)
* Qt5Core (required version >= 5.12.0)
* KF5CoreAddons (required version >= 5.70.0)
* Qt5EventDispatcherSupport
* Qt5FontDatabaseSupport
* Threads
* Qt5Svg
* Qt5Network
* Qt5ThemeSupport
* Qt5AccessibilitySupport
* Qt5WindowsUIAutomationSupport
* Qt5Gui (required version >= 5.15.0)
* KF5WindowSystem (required version >= 5.70.0)

-- The following features have been disabled:

* QCH, API documentation in QCH format (for e.g. Qt Assistant, Qt Creator & KDevelop)

-- The following OPTIONAL packages have not been found:

* X11

-- Configuring done
CMake Error at src/CMakeLists.txt:20 (add_library):
  Target "KF5Crash" links to target "Qt5::WinExtras" but the target was not
  found.  Perhaps a find_package() call is missing for an IMPORTED target, or
  an ALIAS target is missing?


CMake Error at src/CMakeLists.txt:20 (add_library):
  Target "KF5Crash" links to target "Qt5::WinExtras" but the target was not
  found.  Perhaps a find_package() call is missing for an IMPORTED target, or
  an ALIAS target is missing?


-- Generating done
CMake Warning:
  Manually-specified variables were not used by the project:

    CMAKE_FIND_PREFIX_PATH
    CMAKE_INCLUDE_PATH
    CMAKE_SYSTEM_INCLUDE_PATH
    INSTALL_ROOT
    MXE_TOOLCHAIN
    ZLIB_ROOT


CMake Generate step failed.  Build files cannot be regenerated correctly.
gmake[3]: *** [ext_kf5_frameworks/CMakeFiles/ext_kcrash.dir/build.make:130 : ext_kf5_frameworks/ext_kcrash-prefix/src/ext_kcrash-stamp/ext_kcrash-configure] Erreur 1
gmake[2]: *** [CMakeFiles/Makefile2:1393 : ext_kf5_frameworks/CMakeFiles/ext_kcrash.dir/all] Erreur 2
gmake[1]: *** [CMakeFiles/Makefile2:1400 : ext_kf5_frameworks/CMakeFiles/ext_kcrash.dir/rule] Erreur 2
gmake: *** [Makefile:450 : ext_kcrash] Erreur 2
FAILED COMMAND: ${MXE_BUILD_TARGETS}-cmake --build . --config RelWithDebInfo --target ext_kcrash -- -j$CPU_CORES


# Switch to a more recent gcc version
echo 'override MXE_PLUGIN_DIRS += plugins/gcc9' >> settings.mk

make -j48 MXE_TARGETS=$MXE_BUILD_TARGETS \
     cmake \
     gettext \
     freeglut \
     libxml2 \
     libxslt \
     libjpeg-turbo \
     libpng \
     tiff \
     boost \
     expat \
     lcms \
     liblqr-1 \
     eigen \
     jasper \
     zlib \
     mman-win32 \
     pthreads \
     qtbase \
     qttranslations \
     qtimageformats \
     qtwebkit \
     qttools \
     qtwinextras \
     sqlite  \
     qtscript \
     x265 \
     ffmpeg \
     openal \
     libical \
     imagemagick

echo -e "\n"

https://api.kde.org/frameworks/kcrash/html/index.html

Re: Resizing of border line of software

I check tomorow, time to go to my work..