Code Monkey home page Code Monkey logo

Comments (12)

Schildkroet avatar Schildkroet commented on September 25, 2024 1

This values come from the main window form
https://github.com/Schildkroet/Candle2/blob/master/src/frmmain.ui#L9-L10

I can shrink the the x-size to <1600, but not the y-size

from candle2.

GShabanov avatar GShabanov commented on September 25, 2024

Update:
I added this code and I got this messagebox. I don't know why GL doesn't want to initialize.

void frmMain::placeVisualizerButtons()
{
if (ui->glwVisualizer == 0)
{
QMessageBox msgBox;
msgBox.setText("glwVisualizer failed");
msgBox.exec();
return;
}

ui->cmdIsometric->move(ui->glwVisualizer->width() - ui->cmdIsometric->width() - 8, 8);
ui->cmdTop->move(ui->cmdIsometric->geometry().left() - ui->cmdTop->width() - 8, 8);
ui->cmdLeft->move(ui->glwVisualizer->width() - ui->cmdLeft->width() - 8, ui->cmdIsometric->geometry().bottom() + 8);
ui->cmdFront->move(ui->cmdLeft->geometry().left() - ui->cmdFront->width() - 8, ui->cmdIsometric->geometry().bottom() + 8);
ui->cmdFit->move(ui->glwVisualizer->width() - ui->cmdFit->width() - 8, ui->cmdLeft->geometry().bottom() + 8);

}

from candle2.

Schildkroet avatar Schildkroet commented on September 25, 2024

This seems like a graphical issue. Maybe your graphics card is too old or does not support some features.

from candle2.

GShabanov avatar GShabanov commented on September 25, 2024

But regular Candle works. Moreover, I tried the previous version 2.3, it opens (shown UI) and closes immediately. So far I understand that this is somehow related to OpenGL, but so far I have no idea how to get the event trace.
I don't have a problem with other OpenGl applications. Well, for example, I can run Quake3 without problems

from candle2.

Schildkroet avatar Schildkroet commented on September 25, 2024

Older Releases were built with Windows7. Then with Win10. Latest release is built via github-actions (Windows Server 2022). This might have an impact. Involved QT version might also be a possible culprit.

from candle2.

GShabanov avatar GShabanov commented on September 25, 2024

I tried to assemble the original Candle, but there really is some problem. It starts, displays the UI for literally one second, and then closes. However, the version downloaded from the site works. I built it using Qt 5.15.2, it works on the desktop, but not on the laptop. It is possible that this is a problem with new versions of Qt. I'll try to read it tomorrow, maybe this problem exists for others.

from candle2.

chrisrowe895 avatar chrisrowe895 commented on September 25, 2024

Hi,
I am having similar problem on an old Acer laptop(WIN10) that I use in my workshop with older graphics.
My newer Acer laptop (WIN11) runs candle2 with no problem.

from candle2.

GShabanov avatar GShabanov commented on September 25, 2024

I found the direction where to dig. Standard Qt built with the -opengl es2 switch (standard setting for Windows). I'm currently struggling with assembling Qt itself, since this process is not fast, even on a 12900 Intel, plus I'm doing this for the first time.
As soon as I manage to build and check that it works with the -opengl dynamic setting (take from DLL), I will tell you whether it worked or not.

from candle2.

GShabanov avatar GShabanov commented on September 25, 2024

And I finally found the reason! You won't believe what it is.
The default dimensions for the main form are
1646
932
This compiles and produces the file ui_frmmain.h
In order not to change the shape geometry manually, I changed the values
void setupUi(QMainWindow *frmMain)
{
if (frmMain->objectName().isEmpty())
frmMain->setObjectName(QString::fromUtf8("frmMain"));
frmMain->resize(952, 847);

and compiled it. Imagine my surprise when Сandle2 successfully opened on the laptop!

It turns out that the initialization of the constructor
glwVisualizer = new GLWidget(frame);
glwVisualizer->setObjectName(QString::fromUtf8("glwVisualizer"));

     verticalLayout_8->addWidget(glwVisualizer);

This leads to a crash since the physical size of my laptop screen is 1600x900.
Those. The reason the GLWidget object is not created is that the main form is larger than the screen size.

Let me remind you once again that my regular Candle starts without problems.
Default size of its form
952
847

It would be nice to make this size automatic. I'm surprised how dumb Qt is to implement such a trap.

from candle2.

GShabanov avatar GShabanov commented on September 25, 2024

Yes, I understand, there is a dependence on the size of the gadgets. The main thing is that the reason has been found. Perhaps, especially for QGLWidget, you can initially make a small client window, i.e. inherit it not directly from frmmain, but make it another child one.
For myself, I kind of solved the problem, it worked for me. Since I am a programmer myself I know what problems people encounter. I decided to figure it out and find the reason. Well, be sure to share my findings. Making corrections and improvements is yours. :)

from candle2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.